summaryrefslogtreecommitdiff
path: root/captcha.php
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2025-12-09 01:43:12 +0500
committerilotterytea <iltsu@alright.party>2025-12-09 01:43:12 +0500
commit29477e67ede12347b153e2255325327374e1b073 (patch)
treebe9170a20d332eab1fcc8b380f70f231921aac45 /captcha.php
parent28bb4f3618e2e947d14a05a24e99d826c26c0ce3 (diff)
feat: new configuration
Diffstat (limited to 'captcha.php')
-rw-r--r--captcha.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/captcha.php b/captcha.php
index 0b85bf8..3629cd0 100644
--- a/captcha.php
+++ b/captcha.php
@@ -26,7 +26,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST["answer"])) {
$file_folder = $_SERVER["DOCUMENT_ROOT"] . '/static/img/captcha';
-if (!CAPTCHA_ENABLE || ($_SESSION["captcha_solved"] ?? false) || !is_dir($file_folder)) {
+if (!CONFIG['captcha']['enable'] || ($_SESSION["captcha_solved"] ?? false) || !is_dir($file_folder)) {
$_SESSION["captcha_solved"] = true;
echo json_response([
"status_code" => 200,
@@ -45,8 +45,8 @@ $filename = basename($filename, ".png");
$_SESSION["captcha_word"] = $filename;
$image = generate_image_captcha(
- CAPTCHA_SIZE[0],
- CAPTCHA_SIZE[1],
+ CONFIG['captcha']['x'],
+ CONFIG['captcha']['y'],
random_int(1, 3),
$filename,
$file_folder