diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-03-05 17:04:45 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-03-06 11:51:25 +0100 |
commit | 9136e6ad3028040b91685fc94e8fccd29c9b9210 (patch) | |
tree | 5b8ceb5605330524527812c41eba8d6281f9985e /lib/private/request.php | |
parent | c7e204bd3674b616faddbb0b88187f94638e5b01 (diff) | |
download | nextcloud-server-9136e6ad3028040b91685fc94e8fccd29c9b9210.tar.gz nextcloud-server-9136e6ad3028040b91685fc94e8fccd29c9b9210.zip |
Fixed X-Forwarded-Host parsing
Diffstat (limited to 'lib/private/request.php')
-rwxr-xr-x | lib/private/request.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/private/request.php b/lib/private/request.php index 347d77b3724..8041c4f0048 100755 --- a/lib/private/request.php +++ b/lib/private/request.php @@ -58,7 +58,8 @@ class OC_Request { $host = null; if (isset($_SERVER['HTTP_X_FORWARDED_HOST'])) { if (strpos($_SERVER['HTTP_X_FORWARDED_HOST'], ",") !== false) { - $host = trim(array_pop(explode(",", $_SERVER['HTTP_X_FORWARDED_HOST']))); + $parts = explode(',', $_SERVER['HTTP_X_FORWARDED_HOST']); + $host = trim(current($parts)); } else { $host = $_SERVER['HTTP_X_FORWARDED_HOST']; } |