nbs-system / naxsi

NAXSI is an open-source, high performance, low rules maintenance WAF for NGINX
GNU General Public License v3.0
4.8k stars 606 forks source link

Failure to parse scientific numbers in json #437

Closed z0r0 closed 6 years ago

z0r0 commented 6 years ago

Hello, the resulting json fails to pass through rule 15:

z0r0@mybox temp/test » cat test.json
{
    "foobar": -2.806683719414e-14
}
z0r0@mybox temp/test » jsonlint test.json
Valid JSON

z0r0@mybox temp/test » curl -v --data-binary "@test.json" --header "Content-Type: application/json" http://127.0.0.1/foo.html

2018/09/14 13:10:22 [error] 25386#0: *1 NAXSI_FMT: ip=127.0.0.1&server=127.0.0.1&uri=/foo.html&learning=1&vers=0.56&total_processed=1&total_blocked=1&block=1&zone0=BODY&id0=15&var_name0=&zone1=BODY&id1=15&var_name1=, client: 127.0.0.1, server: localhost, request: "POST /foo.html HTTP/1.1", host: "127.0.0.1"
z0r0 commented 6 years ago

Made #438 for a quick fix.