Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(Token): add FILESYSTEM scope with SCOPE_SKIP_PASSWORD_VALIDATION
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 <[email protected]>
  • Loading branch information
blizzz committed Jun 24, 2024
commit 4ccc5905b778a56b996cd8a20ea384c12244a431
5 changes: 4 additions & 1 deletion lib/private/legacy/OC_User.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,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