-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Update existing auth token on apache login #4002
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
regenerate session ID on apache login ocs needs to be able to login via apache Signed-off-by: Morris Jobke <hey@morrisjobke.de>
|
@MorrisJobke, thanks for your PR! By analyzing the history of the files in this pull request, we identified @icewind1991, @tomneedham and @LukasReschke to be potential reviewers. |
| $loginSuccess = $userSession->tryTokenLogin($request); | ||
| if (!$loginSuccess) { | ||
| $loginSuccess = $userSession->tryBasicAuthLogin($request, \OC::$server->getBruteForceThrottler()); | ||
| if (OC_User::handleApacheAuth()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This handleApacheAuth() was basically added here.
| } | ||
| self::getUserSession()->setLoginName($uid); | ||
| $userSession = self::getUserSession(); | ||
| $userSession->getSession()->regenerateId(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the only changed line here.
|
How can I (easily) test stuff like this? Do we have a testing setup, e.g. with docker images somewhere, similar to LDAP? |
🙈 |
|
@LukasReschke Any idea how to test this? |
|
I noticed that this code is not called in our code base: so I removed it #4430 |
|
And here is the cleaned up version: #4539 |
@LukasReschke @ChristophWurst @icewind1991 Please have an in detail look into this. Does this make sense? I only resolved one conflict and naively ported this. Login still works, but I can't judge on this change.