|
29 | 29 | // Variables and constants |
30 | 30 | define('BZ_WR_TIMEZONE', "Europe/Rome"); |
31 | 31 | define('BZ_WR_WEBSERVER', "nginx"); |
32 | | - define('BZ_WR_COOKIE_PATH', "/"); |
33 | | - define('BZ_WR_COOKIE_DOMAIN', "bugs.5mode.com"); |
| 32 | + $BZ_WR_COOKIE_PATH = "/"; |
| 33 | + $BZ_WR_COOKIE_DOMAIN = "bugs.5mode.com"; |
34 | 34 |
|
35 | 35 | // SCRIPT_NAME |
36 | 36 | $f = filter_input(INPUT_GET, 'perl_script'); |
|
102 | 102 | if ($docParsing) { |
103 | 103 | echo($row."\n"); |
104 | 104 | } else { |
105 | | -// echo("header=$row<br>"); |
| 105 | + //echo("header=$row<br>"); |
106 | 106 | if (mb_strpos(strtolower($row), "set-cookie: bugzilla_login=") !== false) { |
107 | 107 | // Parsing for the UserID on the Cookie request |
108 | 108 | $userID = explode("=", explode(";", $row)[0])[1]; |
109 | 109 | // Creating the login cookie.. |
110 | | - setcookie("Bugzilla_login", $userID, time() + 999999999, BZ_WR_COOKIE_PATH, BZ_WR_COOKIE_DOMAIN, true, true); |
| 110 | + $ret=@setcookie("Bugzilla_login", $userID, time() + 999999999, $BZ_WR_COOKIE_PATH, $BZ_WR_COOKIE_DOMAIN, true, true); |
| 111 | + //echo("ret=$ret<br>"); |
| 112 | + if ($ret) { |
| 113 | + $_COOKIE["Bugzilla_login"] = $userID; |
| 114 | + } |
111 | 115 | } else { |
112 | 116 | if ((mb_strpos($row, "--------- =") === false) && (mb_strpos($row, "WARNING:") === false)) { |
113 | 117 | header($row); |
|
0 commit comments