Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
--TEST-- Authentication: KO (invalid reverse proxy IPv6 address) --CGI-- --INI-- spx.http_..
Decoded Output download
--TEST--
Authentication: KO (invalid reverse proxy IPv6 address)
--CGI--
--INI--
spx.http_enabled=1
spx.http_key="dev"
spx.http_ip_var="HTTP_X_FORWARDED_FOR"
spx.http_trusted_proxies="0000:0000:0000:0000:0000:ffff:127.0.0.2,0000:0000:0000:0000:0000:ffff:127.0.0.3,0000:0000:0000:0000:0000:ffff:127.0.0.4"
spx.http_ip_whitelist="0000:0000:0000:0000:0000:ffff:127.0.0.5"
log_errors=on
--ENV--
return <<<END
REMOTE_ADDR=0000:0000:0000:0000:0000:ffff:127.0.0.31
HTTP_X_FORWARDED_FOR=0000:0000:0000:0000:0000:ffff:127.0.0.5
REQUEST_URI=/
END;
--GET--
SPX_KEY=dev&SPX_UI_URI=/data/metrics
--FILE--
<?php
echo 'Normal output';
?>
--EXPECT--
Notice: SPX: access not granted: '0000:0000:0000:0000:0000:ffff:127.0.0.31' is not a trusted proxy in Unknown on line 0
Normal output
Did this file decode correctly?
Original Code
--TEST--
Authentication: KO (invalid reverse proxy IPv6 address)
--CGI--
--INI--
spx.http_enabled=1
spx.http_key="dev"
spx.http_ip_var="HTTP_X_FORWARDED_FOR"
spx.http_trusted_proxies="0000:0000:0000:0000:0000:ffff:127.0.0.2,0000:0000:0000:0000:0000:ffff:127.0.0.3,0000:0000:0000:0000:0000:ffff:127.0.0.4"
spx.http_ip_whitelist="0000:0000:0000:0000:0000:ffff:127.0.0.5"
log_errors=on
--ENV--
return <<<END
REMOTE_ADDR=0000:0000:0000:0000:0000:ffff:127.0.0.31
HTTP_X_FORWARDED_FOR=0000:0000:0000:0000:0000:ffff:127.0.0.5
REQUEST_URI=/
END;
--GET--
SPX_KEY=dev&SPX_UI_URI=/data/metrics
--FILE--
<?php
echo 'Normal output';
?>
--EXPECT--
Notice: SPX: access not granted: '0000:0000:0000:0000:0000:ffff:127.0.0.31' is not a trusted proxy in Unknown on line 0
Normal output
Function Calls
None |
Stats
MD5 | 49b9923122f89a654b0491d0719210c7 |
Eval Count | 0 |
Decode Time | 95 ms |