From fe5bb8b5da1114c4ff4d468916844ed0aa129e94 Mon Sep 17 00:00:00 2001 From: Inverle Date: Thu, 4 Jun 2026 00:14:33 +0200 Subject: [PATCH] Fix captcha widget regression --- xExtension-Captcha/README.md | 2 ++ xExtension-Captcha/extension.php | 4 ++-- xExtension-Captcha/metadata.json | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/xExtension-Captcha/README.md b/xExtension-Captcha/README.md index 38d5dfc8..6aa21025 100644 --- a/xExtension-Captcha/README.md +++ b/xExtension-Captcha/README.md @@ -36,6 +36,8 @@ If you are having trouble with logging in after configuring the extension, you c ## Changelog +* 1.0.6 [2026-06-04] + * Fixed captcha widget not loading due to wrong method visibility on the `Minz_HookType::BeforeLoginBtn` hook, this was a regression introduced in the last (v1.0.5) version [#475](https://github.com/FreshRSS/Extensions/issues/475) * 1.0.5 [2026-03-14] * Ensure controller is hooked properly, even when other extensions are also hooking the same controller, by using new `Minz_HookType::ActionExecute` hook * Fixed a bug where captcha was being verified when creating a user as admin diff --git a/xExtension-Captcha/extension.php b/xExtension-Captcha/extension.php index 35340576..8c2a4ed6 100644 --- a/xExtension-Captcha/extension.php +++ b/xExtension-Captcha/extension.php @@ -42,7 +42,7 @@ public function handleProtectedPage(Minz_ActionController $controller): bool { $csp = $this->loadDependencies(); if (!empty($csp)) $controller->_csp($csp); } elseif (Minz_Request::is('user', 'create') && !FreshRSS_Auth::hasAccess('admin')) { - if (!CaptchaExtension::initCaptcha()) { + if (!$this->initCaptcha()) { return false; } } @@ -58,7 +58,7 @@ private function getClientIp(): string { /** * @throws FreshRSS_Context_Exception */ - private function captchaWidget(): string { + public function captchaWidget(): string { $config = self::getConfig(); if (!$this->isProtectedPage()) { return ''; diff --git a/xExtension-Captcha/metadata.json b/xExtension-Captcha/metadata.json index 8fa4bd0a..8cde1594 100644 --- a/xExtension-Captcha/metadata.json +++ b/xExtension-Captcha/metadata.json @@ -2,7 +2,7 @@ "name": "Form Captcha", "author": "Inverle", "description": "Protect register/login forms with captcha", - "version": "1.0.5", + "version": "1.0.6", "entrypoint": "Captcha", "type": "system" }