Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

Commit b52b52a

Browse files
committed
NoActiveWorkspace => disconnect before throwing an AuthRequiredException, and pass a message.
1 parent 1c95a90 commit b52b52a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

core/src/core/src/pydio/Core/Http/Middleware/AuthMiddleware.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
use Pydio\Core\Model\ContextInterface;
3333
use Pydio\Core\PluginFramework\PluginsService;
3434

35+
use Pydio\Core\Services\AuthService;
3536
use Pydio\Core\Services\ConfService;
3637
use Zend\Diactoros\Response\EmptyResponse;
3738

@@ -68,7 +69,8 @@ public static function handleRequest(\Psr\Http\Message\ServerRequestInterface $r
6869

6970
} catch (NoActiveWorkspaceException $ex){
7071

71-
throw new AuthRequiredException();
72+
AuthService::disconnect();
73+
throw new AuthRequiredException("", $ex->getMessage());
7274

7375
} catch(ActionNotFoundException $a){
7476

0 commit comments

Comments
 (0)