Commit:    03f249395e94cefcea8ff9d638b6a1a12fb7741e
Author:    Hannes Magnusson <[email protected]>         Wed, 22 Jan 2014 
16:34:28 -0800
Parents:   1a43ba3ce8bcf1df8e4d0b4ef6a8c74a23ef9837
Branches:  master

Link:       
http://git.php.net/?p=web/php.git;a=commitdiff;h=03f249395e94cefcea8ff9d638b6a1a12fb7741e

Log:
Fix Origin headers when browsing locally (e.g. using localhost)

Changed paths:
  M  include/prepend.inc


Diff:
diff --git a/include/prepend.inc b/include/prepend.inc
index 04f040d..9abd550 100644
--- a/include/prepend.inc
+++ b/include/prepend.inc
@@ -16,7 +16,9 @@ header("Content-type: text/html; charset=utf-8");
 if (isset($_SERVER["HTTP_ORIGIN"])) {
     $host = parse_url($_SERVER["HTTP_ORIGIN"]);
     if (strncmp(strrev($host["host"]), strrev("php.net"), strlen("php.net")) 
!= 0) {
-        exit(10);
+        if ($host["host"] != $_SERVER["SERVER_NAME"]) {
+            exit(10);
+        }
     }
     if (isset($host["port"])) {
         $hostname = $host["host"] . ":" . $host["port"];


--
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to