Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1fc85226 authored by Israel Yago Pereira's avatar Israel Yago Pereira
Browse files

Fix captcha bypass

parent f1a985a9
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -183,7 +183,11 @@ function captcha_check($email, $from_easy_installer)
    } else {
        $result = new \stdClass();
        $secure = isset($_POST['secure']) ? strtolower($_POST['secure']) : '';
        if ($secure !== $_SESSION['securecode']) {

        $isSessionCodeSet = isset($_SESSION['securecode']);
        $isSecureCodeRight = $secure == $_SESSION['securecode'];

        if (!($isSessionCodeSet && $isSecureCodeRight)) {
            unset($_SESSION['securecode']);
            $result->type = "secure_code";
            $result->key = "error_secure_code";