Opened 3 years ago

Closed 3 years ago

#1704 closed defect (fixed)

I2P-Bote: Prevent http-500-error

Reported by: kay Owned by: str4d
Priority: minor Milestone: 0.9.23
Component: apps/plugins Version: 0.9.22
Keywords: I2P-Bote Cc:
Parent Tickets:

Description

When using browsers like links2 or dillo disabling of the checkmail-buttondoesn't work and clicking checkmail before the initialization phase is finished causes a 500-server error.

Maybe, prevent this NPE in the 'backend':

@@ -527,11 +527,13 @@ public class I2PBote implements NetworkStatusSource, EmailFolderManager, MailSen
     }
 
     public synchronized void checkForMail() throws PasswordException, IOException, GeneralSecurityException {
-        emailChecker.checkForMail();
+        if (null != emailChecker)
+            emailChecker.checkForMail();
     }
 
     public synchronized void checkForMail(String key) throws PasswordException, IOException, GeneralSecurityException {
-        emailChecker.checkForMail(key);
+        if (null != emailChecker)
+            emailChecker.checkForMail(key);
     }

Subtickets

Change History (2)

comment:1 Changed 3 years ago by zzz

  • Priority changed from trivial to minor
  • Summary changed from Prevent http-500-error to I2P-Bote: Prevent http-500-error

comment:2 Changed 3 years ago by str4d

  • Milestone changed from undecided to 0.9.23
  • Resolution set to fixed
  • Status changed from new to closed

Fixed in 050f357aa59374c4e92f517a7ed8bb4aaec4c61c

Note: See TracTickets for help on using tickets.