Skip to content

Commit c04fda7

Browse files
authored
Add files via upload
1 parent 1eaeb0d commit c04fda7

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

index.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
// Variables and constants
3030
define('BZ_WR_TIMEZONE', "Europe/Rome");
3131
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";
3434

3535
// SCRIPT_NAME
3636
$f = filter_input(INPUT_GET, 'perl_script');
@@ -102,12 +102,16 @@
102102
if ($docParsing) {
103103
echo($row."\n");
104104
} else {
105-
// echo("header=$row<br>");
105+
//echo("header=$row<br>");
106106
if (mb_strpos(strtolower($row), "set-cookie: bugzilla_login=") !== false) {
107107
// Parsing for the UserID on the Cookie request
108108
$userID = explode("=", explode(";", $row)[0])[1];
109109
// 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+
}
111115
} else {
112116
if ((mb_strpos($row, "--------- =") === false) && (mb_strpos($row, "WARNING:") === false)) {
113117
header($row);

0 commit comments

Comments
 (0)