drop captcha protection per session
diff --git a/captcha.php b/captcha.php
index af7f3c1..7c4eb6d 100644
--- a/captcha.php
+++ b/captcha.php
@@ -3,13 +3,14 @@
require_once 'config.php';
require_once 'redis.php';
include_once 'utils.php';
+
use Gregwar\Captcha\CaptchaBuilder;
use Gregwar\Captcha\PhraseBuilder;
session_start();
error_reporting(0);
-if (isset($_SESSION['captcha_token']) && $_GET['token']==$_SESSION['captcha_token']) {
+//if (isset($_SESSION['captcha_token']) && $_GET['token'] == $_SESSION['captcha_token']) {
header('Content-type: image/jpeg');
header('Cache-control: no-store');
if (redis_inc_ipdata(getClientIP(), "captcha") > $HOURLY_CAPTCHAS) die("blocked");
@@ -22,4 +23,4 @@
$builder->build();
$_SESSION['captcha'] = $builder->getPhrase();
$builder->output();
-}else echo "huh?";
+//} else echo "huh?";
diff --git a/redis.php b/redis.php
index e6157dc..f1cb0c0 100755
--- a/redis.php
+++ b/redis.php
@@ -31,4 +31,3 @@
$redis = connect();
$redis->del($key);
}
-?>
diff --git a/utils.php b/utils.php
index 0c3ad1f..5c2f399 100644
--- a/utils.php
+++ b/utils.php
@@ -32,9 +32,9 @@
function template_path(string $lang_cc = null)
{
include "config.php";
- if (isset($LANG_CC) && !empty($LANG_CC) && $lang_cc == null) $lang_cc = $LANG_CC;
if (isset($_SESSION["cc"])) $lang_cc = $GLOBALS["cc"];
if (isset($GLOBALS["cc"])) $lang_cc = $GLOBALS["cc"];
+ if (isset($LANG_CC) && !empty($LANG_CC) && $lang_cc == null) $lang_cc = $LANG_CC;
if ($lang_cc) $INCLUDE_STRINGS_PATH = "templates_" . $lang_cc;
else $INCLUDE_STRINGS_PATH = "templates";