]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix potential empty result 25224/head
authorJoas Schilling <coding@schilljs.com>
Wed, 20 Jan 2021 09:09:45 +0000 (10:09 +0100)
committerJoas Schilling <coding@schilljs.com>
Wed, 20 Jan 2021 09:09:45 +0000 (10:09 +0100)
Signed-off-by: Joas Schilling <coding@schilljs.com>
apps/files_external/lib/Listener/StorePasswordListener.php

index a2c359e58dbb120c17eb140457f742dab8d1f2b4..27de4ada4654fe2c8f47c8e3ba0764bb1a7d6a90 100644 (file)
@@ -51,9 +51,9 @@ class StorePasswordListener implements IEventListener {
                }
 
                $stored = $this->credentialsManager->retrieve($event->getUser()->getUID(), LoginCredentials::CREDENTIALS_IDENTIFIER);
-               $update = $stored['password'] !== $event->getPassword();
+               $update = isset($stored['password']) && $stored['password'] !== $event->getPassword();
                if (!$update && $event instanceof UserLoggedInEvent) {
-                       $update = $stored['user'] !== $event->getLoginName();
+                       $update = isset($stored['user']) && $stored['user'] !== $event->getLoginName();
                }
 
                if ($stored && $update) {