Closed jacobbaungard closed 5 years ago
wouldn't this lead to double decoded strings in most scenarios?
Where else are strings decoded?
As far as I know, if you feed an already decoded string to urldecode no transformations are done.
according to http://php.net/manual/en/function.urldecode.php
Warning: The superglobals $_GET and $_REQUEST are already decoded. Using urldecode() on an element in $_GET or $_REQUEST could have unexpected and dangerous results.
using urldecode multiple times breaks existing setups and leads to unexpected values. Here is a simple example:
<?php
$test = "a%2Bz\n";
print urldecode($test);
print urldecode(urldecode($test));
?>
returns:
a+z
a z
Strange. In my quick setup I didn't get the values in a urldecoded format, I guess there are problems elsewere then.
In some scenarios I experienced the query which was sent to Influx, to include urlencoded strings. As a result data would not be fetched from the database correctly.
This commit ensures that the constants for HOST and SERVICE are urldecoded in order to avoid the above.
Signed-off-by: Jacob Hansen jhansen@op5.com