summaryrefslogtreecommitdiff
path: root/captcha.php
diff options
context:
space:
mode:
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