diff --git a/appinfo/info.xml b/appinfo/info.xml
index 5b8030fa6a437e747c1245080ebbfcd7626164b6..39b37f5818768f798fb7d03d736387fb8dffde80 100644
--- a/appinfo/info.xml
+++ b/appinfo/info.xml
@@ -5,7 +5,7 @@
Email Recovery
Email Recovery App
- 6.0.1
+ 6.0.2
agpl
MURENA SAS
EmailRecovery
diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php
index d98ff3a0487e6ccbd03202c133f2cbca53e62e09..332e94a7a7ada01a4cbee9ba5ec990e1954364ee 100644
--- a/lib/AppInfo/Application.php
+++ b/lib/AppInfo/Application.php
@@ -26,16 +26,16 @@ declare(strict_types=1);
namespace OCA\EmailRecovery\AppInfo;
+use OCA\EmailRecovery\Listeners\BeforeTemplateRenderedListener;
+use OCA\EmailRecovery\Listeners\UserConfigChangedListener;
+use OCA\EmailRecovery\Notification\Notifier;
use OCP\AppFramework\App;
+use OCP\AppFramework\Bootstrap\IBootContext;
use OCP\AppFramework\Bootstrap\IBootstrap;
use OCP\AppFramework\Bootstrap\IRegistrationContext;
-use OCA\EmailRecovery\Listeners\UserConfigChangedListener;
-use OCA\EmailRecovery\Listeners\BeforeTemplateRenderedListener;
-use OCP\User\Events\UserConfigChangedEvent;
-use OCP\AppFramework\Bootstrap\IBootContext;
use OCP\AppFramework\Http\Events\BeforeTemplateRenderedEvent;
use OCP\Notification\IManager as INotificationManager;
-use OCA\EmailRecovery\Notification\Notifier;
+use OCP\User\Events\UserConfigChangedEvent;
class Application extends App implements IBootstrap {
public const APP_ID = 'email-recovery';
diff --git a/lib/BackgroundJob/WeeklyRecoveryNotificationJob.php b/lib/BackgroundJob/WeeklyRecoveryNotificationJob.php
index 3f4b94a8e36f8c48ba96f3b0ea94fdaa5c97772d..6e128f07ce12edf0d81925f18177b3ca3029b390 100644
--- a/lib/BackgroundJob/WeeklyRecoveryNotificationJob.php
+++ b/lib/BackgroundJob/WeeklyRecoveryNotificationJob.php
@@ -24,19 +24,19 @@ declare(strict_types=1);
namespace OCA\EmailRecovery\BackgroundJob;
+use OCA\EmailRecovery\AppInfo\Application;
+use OCA\EmailRecovery\Service\NotificationService;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\BackgroundJob\TimedJob;
use OCP\IConfig;
+use OCP\IURLGenerator;
+use OCP\IUser;
use OCP\IUserManager;
use OCP\Mail\IEMailTemplate;
use OCP\Mail\IMailer;
-use Psr\Log\LoggerInterface;
-use OCA\EmailRecovery\AppInfo\Application;
-use OCA\EmailRecovery\Service\NotificationService;
-use OCP\IUser;
-use OCP\Notification\INotification;
use OCP\Notification\IManager as INotificationManager;
-use OCP\IURLGenerator;
+use OCP\Notification\INotification;
+use Psr\Log\LoggerInterface;
class WeeklyRecoveryNotificationJob extends TimedJob {
private IConfig $config;
diff --git a/lib/Controller/EmailRecoveryController.php b/lib/Controller/EmailRecoveryController.php
index cded6cd55d8d930cb7b4916984f669cb377375e9..776fd4388b2749c783dd6e8ea89ac4b2a39f2971 100644
--- a/lib/Controller/EmailRecoveryController.php
+++ b/lib/Controller/EmailRecoveryController.php
@@ -25,11 +25,11 @@
namespace OCA\EmailRecovery\Controller;
use Exception;
+use OCA\EmailRecovery\Exception\BlacklistedEmailException;
use OCA\EmailRecovery\Exception\InvalidRecoveryEmailException;
use OCA\EmailRecovery\Exception\MurenaDomainDisallowedException;
use OCA\EmailRecovery\Exception\RecoveryEmailAlreadyFoundException;
use OCA\EmailRecovery\Exception\SameRecoveryEmailAsEmailException;
-use OCA\EmailRecovery\Exception\BlacklistedEmailException;
use OCA\EmailRecovery\Service\RecoveryEmailService;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\JSONResponse;
diff --git a/lib/Listeners/UserConfigChangedListener.php b/lib/Listeners/UserConfigChangedListener.php
index 446257b1fd697ea28a1de72a9e6a23b6d8bd36d5..70e620ee5cfa891f3a30add9d4f9883639f133cb 100644
--- a/lib/Listeners/UserConfigChangedListener.php
+++ b/lib/Listeners/UserConfigChangedListener.php
@@ -8,8 +8,8 @@ use OCA\EmailRecovery\Service\RecoveryEmailService;
use OCP\EventDispatcher\Event;
use OCP\EventDispatcher\IEventListener;
use OCP\ILogger;
-use OCP\User\Events\UserConfigChangedEvent;
use OCP\IUserManager;
+use OCP\User\Events\UserConfigChangedEvent;
class UserConfigChangedListener implements IEventListener {
private $logger;
diff --git a/lib/Notification/Notifier.php b/lib/Notification/Notifier.php
index d71d5d951031feed5232e814ae4c5201f01c2a52..15acaec45eaba5440474dbf965b5ef8687d6492f 100644
--- a/lib/Notification/Notifier.php
+++ b/lib/Notification/Notifier.php
@@ -25,12 +25,12 @@ declare(strict_types=1);
namespace OCA\EmailRecovery\Notification;
+use OCA\EmailRecovery\AppInfo\Application;
+use OCA\EmailRecovery\Service\NotificationService;
use OCP\L10N\IFactory;
use OCP\Notification\INotification;
use OCP\Notification\INotifier;
-use OCA\EmailRecovery\AppInfo\Application;
use Psr\Log\LoggerInterface;
-use OCA\EmailRecovery\Service\NotificationService;
class Notifier implements INotifier {
/** @var IFactory */
diff --git a/lib/Service/RecoveryEmailService.php b/lib/Service/RecoveryEmailService.php
index 1b01bd65472def1bd2bd0214cc8fcd12b2735e90..96a27b38061c39557f0a5d565927aeee4956d08b 100644
--- a/lib/Service/RecoveryEmailService.php
+++ b/lib/Service/RecoveryEmailService.php
@@ -237,8 +237,14 @@ class RecoveryEmailService {
public function isBlacklistedEmail(string $email): bool {
// Get the blacklisted domains from configuration
$blacklistedDomainsInJson = $this->config->getAppValue('ecloud-accounts', 'blacklisted_domains');
+ if (empty($blacklistedDomainsInJson)) {
+ return false;
+ }
$blacklistedDomains = json_decode($blacklistedDomainsInJson, true);
+ if (empty($blacklistedDomains)) {
+ return false;
+ }
// Split the email address into parts using explode
$emailParts = explode('@', $email);
diff --git a/lib/Settings/RecoveryEmailSettings.php b/lib/Settings/RecoveryEmailSettings.php
index d509046040a209680da475a9e6dfa670b2d2b355..407b7ba5f2b42a522695d1a0972cdd94896cb98d 100644
--- a/lib/Settings/RecoveryEmailSettings.php
+++ b/lib/Settings/RecoveryEmailSettings.php
@@ -26,11 +26,11 @@ declare(strict_types=1);
namespace OCA\EmailRecovery\Settings;
+use OCA\EmailRecovery\Service\RecoveryEmailService;
use OCP\AppFramework\Http\TemplateResponse;
+use OCP\AppFramework\Services\IInitialState;
use OCP\IUserSession;
use OCP\Settings\ISettings;
-use OCP\AppFramework\Services\IInitialState;
-use OCA\EmailRecovery\Service\RecoveryEmailService;
class RecoveryEmailSettings implements ISettings {
private string $appName;