Browse Source

Reply with UNAUTHORIZED like on APIs when login exception was thrown

Signed-off-by: Joas Schilling <coding@schilljs.com>
tags/v22.0.0beta1
Joas Schilling 3 years ago
parent
commit
a2d5d2d613
No account linked to committer's email address
2 changed files with 2 additions and 2 deletions
  1. 1
    1
      build/integration/features/provisioning-v1.feature
  2. 1
    1
      index.php

+ 1
- 1
build/integration/features/provisioning-v1.feature View File

@@ -687,4 +687,4 @@ Feature: provisioning
And assure user "user0" is disabled
And As an "user0"
When sending "GET" with exact url to "/index.php/apps/files"
And the HTTP status code should be "403"
And the HTTP status code should be "401"

+ 1
- 1
index.php View File

@@ -55,7 +55,7 @@ try {
OC_Template::printExceptionErrorPage($ex, 500);
}
} catch (\OC\User\LoginException $ex) {
OC_Template::printErrorPage($ex->getMessage(), $ex->getMessage(), 403);
OC_Template::printErrorPage($ex->getMessage(), $ex->getMessage(), 401);
} catch (Exception $ex) {
\OC::$server->getLogger()->logException($ex, ['app' => 'index']);


Loading…
Cancel
Save