Skip to content
This repository was archived by the owner on Mar 27, 2026. It is now read-only.

Commit 9bfe146

Browse files
committed
fix: salt parameter splicing
1 parent 7719edb commit 9bfe146

3 files changed

Lines changed: 11 additions & 5 deletions

File tree

altcha.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@
77
* Description: ALTCHA is a free, open-source CAPTCHA alternative that offers robust protection without using cookies, ensuring full GDPR compliance by design. It also provides invisible anti-spam and anti-bot protection through ALTCHA's API.
88
* Author: Altcha.org
99
* Author URI: https://altcha.org
10-
* Version: 1.26.2
11-
* Stable tag: 1.26.2
10+
* Version: 1.26.3
11+
* Stable tag: 1.26.3
1212
* Requires at least: 5.0
1313
* Requires PHP: 7.3
1414
* Tested up to: 6.8
1515
* License: GPLv2 or later
1616
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
1717
*/
1818

19-
define('ALTCHA_VERSION', '1.26.2');
19+
define('ALTCHA_VERSION', '1.26.3');
2020
define('ALTCHA_WEBSITE', 'https://altcha.org/');
2121
define('ALTCHA_WIDGET_VERSION', '2.2.2');
2222

includes/core.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,9 @@ public function generate_challenge($hmac_key = null, $complexity = null, $expire
464464
'expires' => time() + $expires
465465
));
466466
}
467+
if (!str_ends_with($salt, '&')) {
468+
$salt .= '&';
469+
}
467470
switch ($complexity) {
468471
case 'low':
469472
$min_secret = 100;

readme.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
Tags: altcha, captcha, spam, anti-spam, anti-bot, antispam, recaptcha, hcaptcha, gdpr
33
Author: Altcha.org
44
Author URI: https://altcha.org
5-
Version: 1.26.2
6-
Stable tag: 1.26.2
5+
Version: 1.26.3
6+
Stable tag: 1.26.3
77
Requires at least: 5.0
88
Requires PHP: 7.3
99
Tested up to: 6.8
@@ -114,6 +114,9 @@ All source code for the plugin, and the ALTCHA widget is available on GitHub. In
114114

115115
== Changelog ==
116116

117+
= 1.26.3 =
118+
* Fixed possible replay attacks via salt splicing.
119+
117120
= 1.26.2 =
118121
* Updated readme for the new version 2.
119122

0 commit comments

Comments
 (0)