diff options
author | Morris Jobke <hey@morrisjobke.de> | 2016-12-05 22:29:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-05 22:29:29 +0100 |
commit | aac3024878dd97ead2b627b963dba6d7dffc049f (patch) | |
tree | 00b7d4e3f42be8fe6e64a44bb88a188b74b4a8b0 /lib | |
parent | ea4baa626984f893d7098f540ff4e929bd12ce6f (diff) | |
parent | e368a745aa5f9eb53327b2875d9fade8b4e8398b (diff) | |
download | nextcloud-server-aac3024878dd97ead2b627b963dba6d7dffc049f.tar.gz nextcloud-server-aac3024878dd97ead2b627b963dba6d7dffc049f.zip |
Merge pull request #2505 from nextcloud/sudo-mode-provisioning-api
Require sudo mode on the provisioning API
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/User/Session.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/private/User/Session.php b/lib/private/User/Session.php index c3561cf64e3..dcda825b9db 100644 --- a/lib/private/User/Session.php +++ b/lib/private/User/Session.php @@ -423,6 +423,7 @@ class Session implements IUserSession, Emitter { * * @todo do not allow basic auth if the user is 2FA enforced * @param IRequest $request + * @param OC\Security\Bruteforce\Throttler $throttler * @return boolean if the login was successful */ public function tryBasicAuthLogin(IRequest $request, @@ -440,6 +441,10 @@ class Session implements IUserSession, Emitter { $this->session->set( Auth::DAV_AUTHENTICATED, $this->getUser()->getUID() ); + + // Set the last-password-confirm session to make the sudo mode work + $this->session->set('last-password-confirm', $this->timeFacory->getTime()); + return true; } } catch (PasswordLoginForbiddenException $ex) { |