]> code.citadel.org Git - citadel.git/commitdiff
* Don't give away anonymous poster information in IMAP or RFC822
authorArt Cancro <ajc@citadel.org>
Tue, 9 Dec 2003 05:12:49 +0000 (05:12 +0000)
committerArt Cancro <ajc@citadel.org>
Tue, 9 Dec 2003 05:12:49 +0000 (05:12 +0000)
citadel/ChangeLog
citadel/imap_fetch.c
citadel/msgbase.c

index 43766fdeb4cdd359a238f9c8d165be65fe03a2c3..e62e3e49ae2dd9f620db6f54825029128dd6eb5c 100644 (file)
@@ -1,4 +1,7 @@
  $Log$
+ Revision 612.8  2003/12/09 05:12:49  ajc
+ * Don't give away anonymous poster information in IMAP or RFC822
+
  Revision 612.7  2003/12/09 04:50:16  ajc
  * Painstakingly combed through IMAP headers and responses for two hours in
    an attempt to figure out why the horrendous pile of crap called Microsoft
@@ -5128,3 +5131,4 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import
+
index 7144a2dd72c2def9fb79097bb1b72bcc13562f41..c614e6e7420f9468bf399be3b91110923174d06b 100644 (file)
@@ -253,10 +253,22 @@ void imap_load_part(char *name, char *filename, char *partnum, char *disp,
 void imap_output_envelope_from(struct CtdlMessage *msg) {
        char user[1024], node[1024], name[1024];
 
+       /* For anonymous messages, it's so easy! */
+       if (!is_room_aide() && (msg->cm_anon_type == MES_ANONONLY)) {
+               cprintf("((\"----\" NIL \"x\" \"x.org\")) ");
+               return;
+       }
+       if (!is_room_aide() && (msg->cm_anon_type == MES_ANONOPT)) {
+               cprintf("((\"anonymous\" NIL \"x\" \"x.org\")) ");
+               return;
+       }
+
+       /* For everything else, we do stuff. */
        cprintf("((");                          /* open double-parens */
        imap_strout(msg->cm_fields['A']);       /* personal name */
        cprintf(" NIL ");                       /* source route (not used) */
 
+
        if (msg->cm_fields['F'] != NULL) {
                process_rfc822_addr(msg->cm_fields['F'], user, node, name);
                imap_strout(user);              /* mailbox name (user id) */
index e6d3832ede196e44fde4e5bc24907f3f40331b1e..52d5cb2b74bdc586a0c1461317b3a3bde43373e4 100644 (file)
@@ -1319,7 +1319,13 @@ int CtdlOutputPreLoadedMsg(struct CtdlMessage *TheMessage,
 
                PerformUserHooks(luser, (-1L), EVT_OUTPUTMSG);
 
-               if (strlen(fuser) > 0) {
+               if (!is_room_aide() && (TheMessage->cm_anon_type == MES_ANONONLY)) {
+                       cprintf("From: x@x.org (----)%s", nl);
+               }
+               else if (!is_room_aide() && (TheMessage->cm_anon_type == MES_ANONOPT)) {
+                       cprintf("From: x@x.org (anonymous)%s", nl);
+               }
+               else if (strlen(fuser) > 0) {
                        cprintf("From: %s (%s)%s", fuser, luser, nl);
                }
                else {