summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2016-12-05 22:29:29 +0100
committerGitHub <noreply@github.com>2016-12-05 22:29:29 +0100
commitaac3024878dd97ead2b627b963dba6d7dffc049f (patch)
tree00b7d4e3f42be8fe6e64a44bb88a188b74b4a8b0 /lib
parentea4baa626984f893d7098f540ff4e929bd12ce6f (diff)
parente368a745aa5f9eb53327b2875d9fade8b4e8398b (diff)
downloadnextcloud-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.php5
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) {