diff options
-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']; } |