Commit 555e9489 authored by Côme Chilliet's avatar Côme Chilliet
Browse files

Merge branch '5935-fatal-error-due-to-crsf-security' into '1.4-dev'

Resolve "Fatal error due to CRSF security"

See merge request fusiondirectory/fd!475
Showing with 2 additions and 1 deletion
+2 -1
......@@ -56,7 +56,8 @@ class CSRFProtection
$origin = preg_replace('|^[^/]+://([^/]+)(/.*)?$|', '\1', $origin);
$target = FALSE;
if (!empty($_SERVER['HTTP_X_FORWARDED_HOST'])) {
$target = $_SERVER['HTTP_X_FORWARDED_HOST'];
/* Only take the first value, there may be several separated by commas */
list($target) = explode(',', $_SERVER['HTTP_X_FORWARDED_HOST'], 2);
} else
if (!empty($_SERVER['HTTP_HOST'])) {
$target = $_SERVER['HTTP_HOST'];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment