Surely that was really secure.

This commit is contained in:
Lncvrt committed 2025-03-02 13:21:22 -07:00
1 parent f147a9dbaa
commit d685949eb7
5 files changed
+18 -20

No files matched your search

+5 -5
View File
@@ -9,15 +9,15 @@ $token = $_POST['captcha_token'] ?? '';
$url = 'https://challenges.cloudflare.com/turnstile/v0/siteverify';
$data = [
'secret' => '0x4AAAAAAARIYYLl4IlaAeS9Q40g-Y6QZ9M',
'response' => $token,
'remoteip' => $ip,
'secret' => $captcha_secretkey,
'response' => $token,
'remoteip' => $ip,
];
$options = [
'http' => [
'header' => 'Content-type: application/x-www-form-urlencoded',
'method' => 'POST',
'header' => 'Content-type: application/x-www-form-urlencoded',
'method' => 'POST',
'content' => http_build_query($data),
],
];
+5 -5
View File
@@ -9,15 +9,15 @@ $token = $_POST['captcha_token'] ?? '';
$url = 'https://challenges.cloudflare.com/turnstile/v0/siteverify';
$data = [
'secret' => '0x4AAAAAAARIYYLl4IlaAeS9Q40g-Y6QZ9M',
'response' => $token,
'remoteip' => $ip,
'secret' => $captcha_secretkey,
'response' => $token,
'remoteip' => $ip,
];
$options = [
'http' => [
'header' => 'Content-type: application/x-www-form-urlencoded',
'method' => 'POST',
'header' => 'Content-type: application/x-www-form-urlencoded',
'method' => 'POST',
'content' => http_build_query($data),
],
];
+2 -4
View File
@@ -15,8 +15,6 @@ $discordClientId = "";
$discordClientSecret = "";
$discordRedirectUri = "";
if (empty($dbservername) || empty($dbusername) || empty($dbpassword) || empty($dbname) || empty($googleProjectId) || empty($googleBucketName) || empty($googleKeyFilePath)) {
http_response_code(500);
die("Please check your config file (are all fields filled in?)");
}
$captcha_secretkey = "";
$captcha_sitekey = "";
?>
+3 -3
View File
@@ -156,7 +156,7 @@ if (isset($_COOKIE['session'])) {
<form id="loginForm">
<input type="text" id="username" placeholder="Username" required>
<input type="password" id="password" placeholder="Password" required>
<div class="cf-turnstile" data-sitekey="0x4AAAAAAARIYQd110ap2OR-" data-callback="javascriptCallback"></div>
<div class="cf-turnstile" data-sitekey="<?= $captcha_sitekey ?>" data-callback="javascriptCallback"></div>
<button type="submit" id="btn" style="margin-bottom: 5px;">Login</button>
</form>
<a id="btn" href="/dashboard/register.php">Don't have an account?</a>
@@ -165,7 +165,7 @@ if (isset($_COOKIE['session'])) {
let captcha_token = ''
window.onloadTurnstileCallback = function () {
turnstile.render('.cf-turnstile', {
sitekey: '0x4AAAAAAARIYQd110ap2OR-',
sitekey: '<?= $captcha_sitekey ?>',
callback: function(token) {
captcha_token = token
},
@@ -199,7 +199,7 @@ if (isset($_COOKIE['session'])) {
alert(response.response + ' (' + xhr.status + ')');
captcha_token = '';
turnstile.render('.cf-turnstile', {
sitekey: '0x4AAAAAAARIYQd110ap2OR-',
sitekey: '<?= $captcha_sitekey ?>',
callback: function(token) {
captcha_token = token
},
+3 -3
View File
@@ -99,7 +99,7 @@ if (isset($_COOKIE['session'])) {
<input type="text" id="displayname" placeholder="Display Name (optional)">
<input type="text" id="username" placeholder="Username" required>
<input type="password" id="password" placeholder="Password" required>
<div class="cf-turnstile" data-sitekey="0x4AAAAAAARIYQd110ap2OR-" data-callback="javascriptCallback"></div>
<div class="cf-turnstile" data-sitekey="<?= $captcha_sitekey ?>" data-callback="javascriptCallback"></div>
<button type="submit" id="btn" style="margin-bottom: 5px;">Register</button>
</form>
<a id="btn" href="/dashboard/login.php">Already have an account?</a>
@@ -115,7 +115,7 @@ if (isset($_COOKIE['session'])) {
window.onloadTurnstileCallback = function () {
turnstile.render('.cf-turnstile', {
sitekey: '0x4AAAAAAARIYQd110ap2OR-',
sitekey: '<?= $captcha_sitekey ?>',
callback: function (token) {
captcha_token = token;
},
@@ -213,7 +213,7 @@ if (isset($_COOKIE['session'])) {
alert(response.response + ' (' + xhr.status + ')');
captcha_token = '';
turnstile.render('.cf-turnstile', {
sitekey: '0x4AAAAAAARIYQd110ap2OR-',
sitekey: '<?= $captcha_sitekey ?>',
callback: function (token) {
captcha_token = token;
},