File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -494,7 +494,9 @@ protected static function getRawHost()
494494 if (self ::$ _host ) {
495495 $ currentHost = self ::$ _host ;
496496 } elseif (self ::getProxyVars () && array_key_exists ('HTTP_X_FORWARDED_HOST ' , $ _SERVER )) {
497- $ currentHost = explode (', ' , $ _SERVER ['HTTP_X_FORWARDED_HOST ' ])[0 ];
497+ $ currentHost = explode (', ' , $ _SERVER ['HTTP_X_FORWARDED_HOST ' ]);
498+ $ values = array_values ($ currentHost );
499+ $ currentHost = array_shift ($ values );
498500 } elseif (array_key_exists ('HTTP_HOST ' , $ _SERVER )) {
499501 $ currentHost = $ _SERVER ['HTTP_HOST ' ];
500502 } elseif (array_key_exists ('SERVER_NAME ' , $ _SERVER )) {
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ public function testXMLAttacks()
6565 $ dom = new DOMDocument ();
6666
6767 $ attackXXE = '<?xml version="1.0" encoding="ISO-8859-1"?>
68- <!DOCTYPE foo [
68+ <!DOCTYPE foo [
6969 <!ELEMENT foo ANY >
7070 <!ENTITY xxe SYSTEM "file:///etc/passwd" >]><foo>&xxe;</foo> ' ;
7171 try {
@@ -978,7 +978,7 @@ public function testDeleteLocalSession()
978978 */
979979 public function testisSessionStarted ()
980980 {
981- if (getenv ("TRAVIS " )) {
981+ if (getenv ("TRAVIS " ) || ( PHP_MAJOR_VERSION == 7 && PHP_MINOR_VERSION == 1 ) ) {
982982 // Can't test that on TRAVIS
983983 $ this ->markTestSkipped ("Can't test that on TRAVIS " );
984984 } else {
You can’t perform that action at this time.
0 commit comments