labs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1606456 - /labs/panopticon/pan-ezmlm/src/asf/wsgi/ezmlm.py
Date Sun, 29 Jun 2014 11:47:08 GMT
Author: adc
Date: Sun Jun 29 11:47:08 2014
New Revision: 1606456

URL: http://svn.apache.org/r1606456
Log:
Malformed email addresses should cause 400 errors, non-existent lists or groups should cause
404 errors

Modified:
    labs/panopticon/pan-ezmlm/src/asf/wsgi/ezmlm.py

Modified: labs/panopticon/pan-ezmlm/src/asf/wsgi/ezmlm.py
URL: http://svn.apache.org/viewvc/labs/panopticon/pan-ezmlm/src/asf/wsgi/ezmlm.py?rev=1606456&r1=1606455&r2=1606456&view=diff
==============================================================================
--- labs/panopticon/pan-ezmlm/src/asf/wsgi/ezmlm.py (original)
+++ labs/panopticon/pan-ezmlm/src/asf/wsgi/ezmlm.py Sun Jun 29 11:47:08 2014
@@ -263,16 +263,20 @@ def asf_get_archives(mailing_list, messa
     return response
 
 
+# noinspection PyUnboundLocalVariable
 def path_from_root_and_list(list_root_path, mailing_list):
-    local, domain = mailing_list.split('@')
+    try:
+        local, domain = mailing_list.split('@')
+    except ValueError:
+        flask.abort(400)
 
     list_groups = ezmlm_list_groups(list_root_path)
 
     if domain not in list_groups:
-        flask.abort(400)
+        flask.abort(404)
 
     if local not in list_groups[domain]:
-        flask.abort(400)
+        flask.abort(404)
 
     return os.path.join(list_root_path, domain, local)
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@labs.apache.org
For additional commands, e-mail: commits-help@labs.apache.org


Mime
View raw message