Skip to content

Commit

Permalink
fix(Token): add FILESYSTEM scope with SCOPE_SKIP_PASSWORD_VALIDATION
Browse files Browse the repository at this point in the history
The scope design requires scopes to be either not specified, or
specified explicitely. Therefore, when setting the
skip-password-validation scope for user authentication from mechanisms
like SAML, we also have to set the filesystem scope, otherwise they will
lack access to the filesystem.

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
  • Loading branch information
blizzz authored and backportbot[bot] committed Jun 25, 2024
1 parent 93dcf8c commit f016e7e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/private/legacy/OC_User.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,10 @@ public static function loginWithApache(\OCP\Authentication\IApacheBackend $backe
if (empty($password)) {
$tokenProvider = \OC::$server->get(IProvider::class);
$token = $tokenProvider->getToken($userSession->getSession()->getId());
$token->setScope(['password-unconfirmable' => true]);
$token->setScope([
'password-unconfirmable' => true,
'filesystem' => true,
]);
$tokenProvider->updateToken($token);
}

Expand Down

0 comments on commit f016e7e

Please sign in to comment.