diff options
Diffstat (limited to 'lib/public/appframework/http/response.php')
-rw-r--r-- | lib/public/appframework/http/response.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/public/appframework/http/response.php b/lib/public/appframework/http/response.php index 45402d9b3b3..559d14dd7e7 100644 --- a/lib/public/appframework/http/response.php +++ b/lib/public/appframework/http/response.php @@ -92,6 +92,10 @@ class Response { * @return Response Reference to this object */ public function addHeader($name, $value) { + $name = trim($name); // always remove leading and trailing whitespace + // to be able to reliably check for security + // headers + if(is_null($value)) { unset($this->headers[$name]); } else { |