wallarm/gotestwaf

Unable to send report to email

drey143 opened this issue · 9 comments

Hello I'm wondering why the report is unable to be sent to my email. any help will be appreciated.thanks

ERRO[0500] caught error in main function                 error="couldn't send report by email: couldn't marshal report data into JSON format: json: unsupported value: NaN"

Hi!

Thanks for the report! This looks like a bug. I added a check for NaN floating point values to prevent this behavior.

Hi @svkirillov thanks for your quick response. I just tried it now and still getting same error message

Could you please provide full command with url option?

I'm testing this with a simple "Nginx" server to test WAF rule. below is a screenshot of what the test returns.

here is a complete url : go run ./cmd --url=http://nginx-server-test-loadbalancer-614402827.us-east-1.elb.amazonaws.com --blockStatusCode 200

Screen Shot 2022-11-29 at 6 36 14 AM

it's strange everything is 0.00% or n/a. because the default_action in place for the WAF right now is "count". the nginx server has nothing install on it, just the default page for nginx

blockStatusCode is equal to 20. Is it ok?

that was a typo..its 200

Fixed some calculations in #173. Could you check if it works properly for you?

@svkirillov .its working now. thank you