mirror of
https://github.com/nextcloud/server.git
synced 2026-06-13 18:50:47 -04:00
fix(encryption): Do not load encryption js on login
This was breaking ephemeral sessions again. Signed-off-by: Louis Chmn <louis@chmn.me>
This commit is contained in:
parent
99d6276826
commit
5b3876535c
1 changed files with 12 additions and 1 deletions
|
|
@ -7,6 +7,7 @@
|
|||
*/
|
||||
namespace OCA\Encryption\AppInfo;
|
||||
|
||||
use OC\Core\Controller\ClientFlowLoginV2Controller;
|
||||
use OC\Core\Events\BeforePasswordResetEvent;
|
||||
use OC\Core\Events\PasswordResetEvent;
|
||||
use OCA\Encryption\Crypto\Crypt;
|
||||
|
|
@ -26,6 +27,9 @@ use OCP\Encryption\IManager;
|
|||
use OCP\EventDispatcher\IEventDispatcher;
|
||||
use OCP\IConfig;
|
||||
use OCP\IL10N;
|
||||
use OCP\IRequest;
|
||||
use OCP\ISession;
|
||||
use OCP\IURLGenerator;
|
||||
use OCP\IUserSession;
|
||||
use OCP\User\Events\BeforePasswordUpdatedEvent;
|
||||
use OCP\User\Events\PasswordUpdatedEvent;
|
||||
|
|
@ -47,7 +51,14 @@ class Application extends App implements IBootstrap {
|
|||
}
|
||||
|
||||
public function boot(IBootContext $context): void {
|
||||
\OCP\Util::addScript(self::APP_ID, 'encryption');
|
||||
$context->injectFn(function (IRequest $request, IURLGenerator $urlGenerator): void {
|
||||
$webroot = $urlGenerator->getWebroot();
|
||||
if (str_starts_with($request->getPathInfo(), $webroot . '/login')) {
|
||||
return;
|
||||
}
|
||||
|
||||
\OCP\Util::addScript(self::APP_ID, 'encryption');
|
||||
});
|
||||
|
||||
$context->injectFn(function (IManager $encryptionManager) use ($context): void {
|
||||
if (!($encryptionManager instanceof \OC\Encryption\Manager)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue