[Pkg-owncloud-commits] [owncloud] 20/134: Fixed X-Forwarded-Host parsing
David Prévot
taffit at moszumanska.debian.org
Fri Apr 18 21:43:56 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository owncloud.
commit d7163c9b5ada9b7c21456e8ad60964618a18f7aa
Author: Vincent Petry <pvince81 at owncloud.com>
Date: Wed Mar 5 17:04:45 2014 +0100
Fixed X-Forwarded-Host parsing
---
lib/private/request.php | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/private/request.php b/lib/private/request.php
index ed0061e..f4ab76b 100755
--- a/lib/private/request.php
+++ b/lib/private/request.php
@@ -57,7 +57,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'];
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list