mirror of
https://github.com/netzbegruenung/user_saml.git
synced 2024-05-02 09:14:50 +02:00
Merge pull request #554 from nextcloud/bugfix/noid/autoprovision-decoded
Use effective uid for autoprovisioning new users
This commit is contained in:
commit
d0e2667e20
|
@ -148,8 +148,8 @@ class SAMLController extends Controller {
|
|||
}
|
||||
return;
|
||||
}
|
||||
|
||||
$uid = $this->userData->getOriginalUid();
|
||||
$uid = $this->userData->testEncodedObjectGUID($uid);
|
||||
if(!$userExists && !$autoProvisioningAllowed) {
|
||||
throw new NoUserFoundException('Auto provisioning not allowed and user ' . $uid . ' does not exist');
|
||||
} elseif(!$userExists && $autoProvisioningAllowed) {
|
||||
|
|
|
@ -494,8 +494,6 @@ class UserBackend implements IApacheBackend, UserInterface, IUserBackend {
|
|||
}
|
||||
|
||||
if($uid !== '' && $this->userExists($uid)) {
|
||||
$uid = $this->userData->testEncodedObjectGUID($uid);
|
||||
|
||||
$this->session->set('last-password-confirm', strtotime('+4 year', time()));
|
||||
return $uid;
|
||||
}
|
||||
|
|
|
@ -250,6 +250,12 @@ class SAMLControllerTest extends TestCase {
|
|||
->expects(isset($samlUserData['uid']) ? $this->any() : $this->never())
|
||||
->method('getOriginalUid')
|
||||
->willReturn('MyUid');
|
||||
$this->userData
|
||||
->expects($this->any())
|
||||
->method('testEncodedObjectGUID')
|
||||
->willReturnCallback(function ($uid) {
|
||||
return $uid;
|
||||
});
|
||||
$this->userData
|
||||
->expects($this->any())
|
||||
->method('getEffectiveUid')
|
||||
|
|
Loading…
Reference in a new issue