Skip to content

Commit 9e4a4ac

Browse files
committed
Ignore the "X-Forwarded-User" header requested by the user
1 parent 9dd7ebd commit 9e4a4ac

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

no.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@
4646
function getRequestHeaders($multipart_delimiter=NULL) {
4747
$headers = array();
4848
foreach($_SERVER as $key => $value) {
49+
if ($key === "HTTP_X_FORWARDED_USER") {
50+
# Ignore the "X-Forwarded-User" header requested by the user.
51+
continue;
52+
}
4953
if(preg_match("/^HTTP/", $key)) { # only keep HTTP headers
5054
if(preg_match("/^HTTP_HOST/", $key) == 0 && # let curl set the actual host/proxy
5155
preg_match("/^HTTP_ORIGIN/", $key) == 0 &&

0 commit comments

Comments
 (0)