Skip to content

Commit 3aedb46

Browse files
Merge pull request #4428 from FengZh61/fix-jsUrl-parameter-error
fix jsUrl parameter error
2 parents f8aba90 + 7260061 commit 3aedb46

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

install/install.queries.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -1561,9 +1561,9 @@ function encryptFollowingDefuse($message, $ascii_key)
15611561
}
15621562
unlink($csrfp_file); // delete existing csrfp.config file
15631563
copy($csrfp_file_sample, $csrfp_file); // make a copy of csrfp.config.sample file
1564-
$inputData['data'] = file_get_contents($csrfp_file);
1565-
$newdata = str_replace('"CSRFP_TOKEN" => ""', '"CSRFP_TOKEN" => "' . bin2hex(openssl_random_pseudo_bytes(25)) . '"', $inputData['data']);
1566-
$jsUrl = $data_sent['url_path'] . '/includes/libraries/csrfp/js/csrfprotector.js';
1564+
$data = file_get_contents($csrfp_file);
1565+
$newdata = str_replace('"CSRFP_TOKEN" => ""', '"CSRFP_TOKEN" => "' . bin2hex(openssl_random_pseudo_bytes(25)) . '"', $data);
1566+
$jsUrl = './includes/libraries/csrfp/js/csrfprotector.js';
15671567
$newdata = str_replace('"jsUrl" => ""', '"jsUrl" => "' . $jsUrl . '"', $newdata);
15681568
file_put_contents('../includes/libraries/csrfp/libs/csrfp.config.php', $newdata);
15691569

@@ -1618,4 +1618,4 @@ function encryptFollowingDefuse($message, $ascii_key)
16181618
session_destroy();
16191619
break;
16201620
}
1621-
}
1621+
}

0 commit comments

Comments
 (0)