From cf49cd32cb7e8ac5f698e2353156669b4a12139c Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 11 Aug 2023 22:03:30 +0300 Subject: Do not send verification emails to unknown users --- src/main/java/com/juick/www/api/Service.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'src/main') diff --git a/src/main/java/com/juick/www/api/Service.java b/src/main/java/com/juick/www/api/Service.java index 1e3dcdc8..41fdcfbf 100644 --- a/src/main/java/com/juick/www/api/Service.java +++ b/src/main/java/com/juick/www/api/Service.java @@ -79,8 +79,6 @@ public class Service { private User serviceUser; @Inject private StorageService storageService; - @Value("${banned_emails:}") - private String[] ignoredEmails; @Inject private ServerManager serverManager; @@ -186,12 +184,7 @@ public class Service { } } } else { - if (!Arrays.asList(ignoredEmails).contains(from)) { - String verificationCode = RandomStringUtils.randomAlphanumeric(8).toUpperCase(); - emailService.addVerificationCode(null, from, verificationCode); - applicationEventPublisher - .publishEvent(new AccountVerificationEvent(this, from, verificationCode)); - } + logger.info("Unknown user: {}", from); } } catch (AddressException e) { logger.info("Got email with invalid from address"); -- cgit v1.2.3