-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
disable password confirmation with SSO #7487
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7487 +/- ##
============================================
+ Coverage 51.17% 51.18% +0.01%
- Complexity 24887 24892 +5
============================================
Files 1601 1602 +1
Lines 94752 94774 +22
Branches 1368 1369 +1
============================================
+ Hits 48489 48510 +21
- Misses 46263 46264 +1
|
d4a047b
to
eaa8d08
Compare
Can we have unit tests for the middle ware that test positive as well as negative cases? |
Pfff right. I knew I disliked all this functionality in 1 middleware. I'd like to just add an additional one that we can properly test. |
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
eaa8d08
to
763874a
Compare
|
Add tests Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
763874a
to
5705014
Compare
|
||
$lastConfirm = (int) $this->session->get('last-password-confirm'); | ||
// we can't check the password against a SAML backend, so skip password confirmation in this case | ||
if ($backendClassName !== 'user_saml' && $lastConfirm < ($this->timeFactory->getTime() - (30 * 60 + 15))) { // allow 15 seconds delay |
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.
I don't like it is hard-coded… if we can test for an instance (→ OCP) that would be much better. Perhaps for 14, for now (and backporting?) good enough.
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.
cannot test, but code looks good and i am confident with the unit tests
Disable password confirmation in case of single-sign-on.
In case of SSO password confirmation doesn't work because Nextcloud can't check the users password.