Project

General

Profile

Actions

Bug #22881

closed

tx_saltedpasswords_sv1 should use parent object instead of TYPO3_MODE

Added by Alexander Stehlik over 14 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2010-06-15
Due date:
% Done:

100%

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

Description

At the moment, tx_saltedpasswords_sv1 uses the TYPO3_MODE constant to determine in which table the password should be updated (in updatePassword() method).

This isn't very clean and can lead to problems if you use some kind of be/fe login combination extension like simulatebe. There, the user logs in to the Frontend, to TYPO3_MODE is "FE" but wants to authenticate a BE user.

A simple solution to this is the usage of the $pObj field. See the attached patch. It makes things much simpler and cleaner as far as I can see.

(issue imported from #M14727)


Files

patch_saltedpasswords_cleanup.diff (1.42 KB) patch_saltedpasswords_cleanup.diff Administrator Admin, 2010-06-15 12:21

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Task #26410: Enhance info array provided to servicesClosed2011-04-28

Actions
Actions #1

Updated by Marcus Krause almost 14 years ago

Dumping my comment from the core list here:

The patch doesn't solve the problem once and forever.

In tx_saltedpasswords_sv1::init() there's a function call to
tx_saltedpasswords_div::isUsageEnabled() which determines if
saltedpasswords is enabled for the desired TYPO3_MODE.

To completely fix this problem, you would hand over the mode somehow
retrieved from $pObj to tx_saltedpasswords_div::isUsageEnabled().

Luckily, isUsageEnabled() accepts an optional parameter with the TYPO3_MODE.
Unluckily, $pObj is not yet available at this state. It's available with
tx_sv_authbase::initAuth(), the next call in authentication service
instanciation/service.

Actions #2

Updated by Mr. Hudson over 13 years ago

Patch set 1 of change I04180d283d6818b2e09d33f82036f6f88a5cb26c has been pushed to the review server.
It is available at http://review.typo3.org/1778

Actions #3

Updated by Alexander Stehlik over 13 years ago

  • Target version deleted (0)

Hi Marcus.

If finally had some time to work on this issue. I submitted 2 patches to gerrit that take your comments into account.

http://review.typo3.org/1776
http://review.typo3.org/1778

Please have a look at them and let me know what you think.

Kind regards,
Alex

Actions #4

Updated by Mr. Hudson over 13 years ago

Patch set 2 of change I04180d283d6818b2e09d33f82036f6f88a5cb26c has been pushed to the review server.
It is available at http://review.typo3.org/1778

Actions #5

Updated by Oliver Hader over 13 years ago

  • Status changed from New to Under Review
Actions #6

Updated by Alexander Stehlik about 13 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #7

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF