daemon/http: improve URI checks
Fixes #746 (closed)
The check_uri()
function now only checks that the endpoint is either
/doh
or /dns-query
. Parameter checks were moved into
process_uri_path()
so that the check only takes place for GET
requests. POST requests now do not care about parameters at all.
Merge request reports
Activity
added bug label
requested review from @vcunat
assigned to @ostava
- Resolved by Vladimír Čunát
I expect this will also fix that coverity complaint (CID 352838).
When you're touching that cycle already, perhaps also have a look at the "detect &&" part? It seemed really weird (when I saw that CID weeks ago) and it probably doesn't work the way it was intended or I didn't get the point – in particular I can't see how
strlen(beg)
is even related to doing such a check. (well, understandability is a good property in any case)
mentioned in commit aafd336a