Bug #36684

Fixes for functional security tests break custom tests

Added by Karsten Dambekalns over 9 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Should have
Category:
- Testing -
Start date:
2012-04-28
Due date:
% Done:

0%

Estimated time:
PHP Version:
Has patch:
No
Complexity:

Description

In FunctionalTestCase.php the line $this->securityContext->refreshTokens(); causes severe problems for Christopher Hlubek's tests that deal with security. That line was added in https://review.typo3.org/9676 to fix #34466.

I tested without that line and indeed all functional security tests in FLOW3 still pass, if the exception expectation in MethodSecurityTest is again changed from AuthenticationRequiredException to AuthenticationRequiredException.

Christopher: how do your tests fail? Maybe you also have the same wrong expectation?

#1

Updated by Karsten Dambekalns over 9 years ago

Christopher, we decided to submit that change and rather fix this (small) issue separately instead of further working on that huge stack of changes… so please give feedback :)

#2

Updated by Christopher Hlubek over 9 years ago

I'm debugging it right now. It seems that "$this->disableAuthorization()" doesn't do that with the fix for #34466 in place. Since no tokens are authenticated anymore, any code that needs authentication throws an AuthenticationRequiredException. So we need to authenticate a token here to disable authorization (sounds funny).

I'll try to create a functional test in FLOW3 that tests this behavior.

#3

Updated by Gerrit Code Review over 9 years ago

  • Status changed from Needs Feedback to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10897

#4

Updated by Gerrit Code Review over 9 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10897

#5

Updated by Gerrit Code Review over 9 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10897

#6

Updated by Gerrit Code Review over 9 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/10897

#7

Updated by Karsten Dambekalns over 9 years ago

  • Target version changed from 1.1 to 1.1 RC1
#8

Updated by Karsten Dambekalns over 9 years ago

  • Status changed from Under Review to Needs Feedback
  • Target version changed from 1.1 RC1 to 1.1

Christopher, could you check this again and answer Robert's question on the change in Gerrit?

#9

Updated by Karsten Dambekalns over 9 years ago

  • Status changed from Needs Feedback to Closed

No activity, feel free to reopen if needed.

Also available in: Atom PDF