Catch invalid addresses
authorMichael M Slusarz <slusarz@curecanti.org>
Sat, 11 Apr 2009 22:13:29 +0000 (16:13 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Sat, 11 Apr 2009 22:13:29 +0000 (16:13 -0600)
imp/js/src/DimpBase.js
imp/lib/DIMP.php

index c845029..ed0c1ad 100644 (file)
@@ -458,8 +458,10 @@ var DimpBase = {
                     row[search] = row[search].gsub(new RegExp("(" + $F('msgList_filter') + ")", "i"), '<span class="searchMatch">#{1}</span>');
                 }
 
-                // Check status. If null, invalid string was scrubbed by the
-                // JSON encode.
+                // If null, invalid string was scrubbed by JSON encode.
+                if (row.from === null) {
+                    row.from = '[' + DIMP.text.badaddr + ']';
+                }
                 if (row.subject === null) {
                     row.subject = '[' + DIMP.text.badsubject + ']';
                 }
index 0eb7ba5..7b11cd2 100644 (file)
@@ -244,6 +244,7 @@ class DIMP
             'check' => _("Checking..."),
             'verify' => _("Verifying..."),
             'onlogout' => _("Logging Out..."),
+            'badaddr' => _("Invalid Address"),
             'badsubject' => _("Invalid Subject"),
             'ajax_timeout' => _("There has been no contact with the remote server for several minutes. The server may be temporarily unavailable or network problems may be interrupting your session. You will not see any updates until the connection is restored."),
             'ajax_recover' => _("The connection to the remote server has been restored."),