Project

General

Profile

Actions

Bug #24617

closed

BE user's password not changable via setup module with "saltedpasswords" enabled

Added by Tomas Mrozek almost 14 years ago. Updated about 13 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Authentication
Target version:
-
Start date:
2011-01-17
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.4
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

If the "saltedpasswords" extension is installed BUT its use in the backend is NOT enabled (= "BE.enabled" is not true), then any password change in the "User Tools -> User settings" is not accepted.

If the "saltedpasswords" extension is not installed or its setting "BE.enabled" equals TRUE, then everything works fine.

If the "BE.enabled" equals FALSE, then the expected behavior is that the extension does NOT alter the functionality of the backend in any way.
(issue imported from #M17087)


Files

17087.diff (835 Bytes) 17087.diff Administrator Admin, 2011-01-20 00:23
Actions #1

Updated by Tomas Mrozek almost 14 years ago

Maybe related to #20774 which suggests patches that don't seem to be in the current version of "saltedpasswords" and "setup" system extensions.

Actions #2

Updated by Tomas Mrozek almost 14 years ago

Quick (and dirty) fix: comment out lines 20 & 21 in "ext_tables.php" of "saltedpasswords".

Actions #3

Updated by Steffen Gebert almost 14 years ago

Tomas, does moving those two lines into

if (tx_saltedpasswords_div::isUsageEnabled('BE')) {

help?

Actions #4

Updated by Tomas Mrozek almost 14 years ago

Yes, Steffen, that works and thus it might be a correct fix. However, I'm unable to evaluate whether it fixes the right root of the problem. Someone should also confirm the bug in the first place as I have difficulty to believe that such a bug has been in a system extension without being noticed by anyone else.

Actions #5

Updated by Steffen Gebert almost 14 years ago

Tomas, it looks pretty obvious, at least if saltedpasswords doesn't check in the User settings hook.

Will give it a try, but very likely at the end of the week after RC1 release.

Actions #6

Updated by Christian Kuhn almost 14 years ago

Marcus Krause should have a look at that as well, I'll trigger him.

Actions #7

Updated by Marcus Krause almost 14 years ago

thanks for pointing me to this issue

Actions #8

Updated by Marcus Krause almost 14 years ago

Analysis:
Problems are obviously caused by following piece of code
$GLOBALS['TYPO3_USER_SETTINGS']['columns']['password']['eval'] = 'tx_saltedpasswords_eval_be';
$GLOBALS['TYPO3_USER_SETTINGS']['columns']['password2']['eval'] = '';

what this basically does for TYPO3 w/o saltedpasswords installed:
  • default is 'md5'
  • this triggers the md5 hash building of submitted password on clientside via JS
  • it does not cause a real instanciation of an evaluation!!

with saltedpasswords installed and enabled, we only want a value for 'eval' key with anything else than 'md5'; having a class name like now is misleading!

therefore - why does the update failes for outlined cases:
  • password is no longer md5 hashed via JS because TYPO3_USER_SETTINGS contains no 'md5'
  • tcemains uses eval configured via TCA (=md5)
  • submitted password (plain text) does not have the structure of an md5 hash (32 letter hexadecimal string)
  • eval fails - no update!
so solution is:
  • encapsulate (like already suggested) these files with a test if saltedpasswords is enabled for BE
  • fix the misleading values / properly comment

I'll prepare a patch.

Actions #9

Updated by Christian Kuhn almost 14 years ago

trunk rev. 10371
4.5 rev. 10372
4.4 rev. 10373
4.3 rev. 10374

Actions #10

Updated by Steffen Gebert about 13 years ago

  • Category set to Authentication
  • Assignee deleted (Marcus Krause)
  • Target version deleted (0)
Actions

Also available in: Atom PDF