savannah-hackers-public
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Savannah-hackers-public] Prevent creation of mailing lists with names r


From: Yavor Doganov
Subject: [Savannah-hackers-public] Prevent creation of mailing lists with names reserved by Mailman
Date: Fri, 29 Aug 2008 17:29:04 +0300
User-agent: Wanderlust/2.15.6 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.7 Emacs/22.2 (i486-pc-linux-gnu) MULE/5.0 (SAKAKI)

I'm not sure, but judging by sr #106481 and the similar case with
Vivek, it seems to me that mailing lists with such names should not be
created at all, warning the user appropriately.

I tried to "implement" this and I'm ashamed to post the "patch"; this
is the first PHP file I edit in my life :(

Please don't laugh too loud...


From d34a9e66b30569bf5a5b3b5aa57bbfcc34885c99 Mon Sep 17 00:00:00 2001
From: Yavor Doganov <address@hidden>
Date: Fri, 29 Aug 2008 17:14:55 +0300
Subject: [PATCH] Prevent creation of mailing lists with names reserved by 
Mailman.

---
 frontend/php/mail/admin/index.php |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/frontend/php/mail/admin/index.php 
b/frontend/php/mail/admin/index.php
index 5a81569..8e3ace1 100644
--- a/frontend/php/mail/admin/index.php
+++ b/frontend/php/mail/admin/index.php
@@ -125,6 +125,14 @@ if ($post_changes)
            continue;
          }
        
+       // Check if the user specified a name reserved by Mailman.
+       if ($list_name['new'] == ("join" || "leave" || "owner" 
+                                 || "request" || "admin"))
+          {
+           fb(sprintf(_("List name %s is reserved by Mailman."), 
$list_name['new']), 1);
+           continue;
+         }
+
        // Check if the list does not exists already
        $result = db_execute("SELECT group_id FROM mail_group_list WHERE 
lower(list_name)=?", array($new_list_name));
        
-- 
1.5.6.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]