diff options
author | Ermal <eri@pfsense.org> | 2013-01-03 10:24:52 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2013-01-03 10:24:52 +0000 |
commit | e3c4516b2cc0aa031885dbbe05e8b52b4311cc2d (patch) | |
tree | 55c0dd87b2ef5a5664aa20dbf7777097620940bc /usr | |
parent | f7bddb24d5cb98328fae3f83e1719085e099ea6e (diff) | |
download | pfsense-e3c4516b2cc0aa031885dbbe05e8b52b4311cc2d.zip pfsense-e3c4516b2cc0aa031885dbbe05e8b52b4311cc2d.tar.gz |
Use rtrim to avoid issues
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/captiveportal/index.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr/local/captiveportal/index.php b/usr/local/captiveportal/index.php index 0b86e84..72f4749 100755 --- a/usr/local/captiveportal/index.php +++ b/usr/local/captiveportal/index.php @@ -49,8 +49,8 @@ $cpcfg = $config['captiveportal'][$cpzone]; $orig_host = $_ENV['HTTP_HOST']; /* NOTE: IE 8/9 is buggy and that is why this is needed */ -$orig_request = trim($_REQUEST['redirurl'], " "); -$orig_request = ($orig_request == '/') ? '' : $orig_request; +$orig_request = rtrim($_REQUEST['redirurl'], " /"); +$orig_request = empty($orig_request) ? '' : $orig_request; $clientip = $_SERVER['REMOTE_ADDR']; if (!$clientip) { |