We have need to send an encrypted string in a query string to a web page. Sometimes because of the encryption, there is an embedded null in the string. Here is an abbreviated example of such a string, showing the characters to the right of the ?
:
?code=%FE%00%FE
We have several servers that we are using this with. On some servers, the string is passed into the PHP program in $_GET['code']
just fine, and can be decoded as expected. On other servers, the presence of the %00
in the string causes the $_GET['code']
string to be empty.
Is there some setting or application level aspect that is affecting this?
The query string is working on this stack: Apache 2.4.10 - PHP 5.5.24
The query string is empty on this stack: Apache 2.4.12 - PHP 5.6.9
%2B
) I assume. (Otherwise a literal+
in the query string will be converted back into aspace
when read by PHP. Or, you replace a space, not a+
, in the received data.)