aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2025-03-25 10:19:51 +0100
committerGravatar GitHub <noreply@github.com> 2025-03-25 10:19:51 +0100
commitd0b961131939800a119801bfce7411ad2e429e9e (patch)
tree36905ee474193a225fde693d0e179616333e595b /app
parent9e8c306b3edbda071cdd9cc93bcc45055789ad42 (diff)
Update bcrypt.js from 2.4.4 to 3.0.2 (#7449)
https://github.com/dcodeIO/bcrypt.js/releases/tag/v3.0.0 Can be updated to the latest version with: `curl -L https://unpkg.com/bcryptjs/umd/index.js > p/scripts/vendor/bcrypt.js`
Diffstat (limited to 'app')
-rw-r--r--app/Controllers/authController.php2
-rw-r--r--app/Controllers/userController.php2
-rw-r--r--app/Utils/passwordUtil.php7
3 files changed, 2 insertions, 9 deletions
diff --git a/app/Controllers/authController.php b/app/Controllers/authController.php
index 6b6a92c31..9bad837f9 100644
--- a/app/Controllers/authController.php
+++ b/app/Controllers/authController.php
@@ -105,7 +105,7 @@ class FreshRSS_auth_Controller extends FreshRSS_ActionController {
invalidateHttpCache();
FreshRSS_View::prependTitle(_t('gen.auth.login') . ' · ');
- FreshRSS_View::appendScript(Minz_Url::display('/scripts/bcrypt.min.js?' . @filemtime(PUBLIC_PATH . '/scripts/bcrypt.min.js')));
+ FreshRSS_View::appendScript(Minz_Url::display('/scripts/vendor/bcrypt.js?' . @filemtime(PUBLIC_PATH . '/scripts/vendor/bcrypt.js')));
$limits = FreshRSS_Context::systemConf()->limits;
$this->view->cookie_days = (int)round($limits['cookie_duration'] / 86400, 1);
diff --git a/app/Controllers/userController.php b/app/Controllers/userController.php
index 35d5a84c8..9eac0d8ce 100644
--- a/app/Controllers/userController.php
+++ b/app/Controllers/userController.php
@@ -97,7 +97,7 @@ class FreshRSS_user_Controller extends FreshRSS_ActionController {
FreshRSS_View::prependTitle(_t('conf.profile.title') . ' · ');
- FreshRSS_View::appendScript(Minz_Url::display('/scripts/bcrypt.min.js?' . @filemtime(PUBLIC_PATH . '/scripts/bcrypt.min.js')));
+ FreshRSS_View::appendScript(Minz_Url::display('/scripts/vendor/bcrypt.js?' . @filemtime(PUBLIC_PATH . '/scripts/vendor/bcrypt.js')));
if (Minz_Request::isPost() && Minz_User::name() != null) {
$old_email = FreshRSS_Context::userConf()->mail_login;
diff --git a/app/Utils/passwordUtil.php b/app/Utils/passwordUtil.php
index 47587d336..76c5455c5 100644
--- a/app/Utils/passwordUtil.php
+++ b/app/Utils/passwordUtil.php
@@ -15,13 +15,6 @@ class FreshRSS_password_Util {
PASSWORD_BCRYPT,
['cost' => self::BCRYPT_COST]
);
-
- // Compatibility with bcrypt.js
- $passwordHash = preg_replace('/^\$2[xy]\$/', '\$2a\$', $passwordHash);
-
- if ($passwordHash === '' || $passwordHash === null) {
- return '';
- }
return $passwordHash;
}