diff options
| author | cotton | 1998-10-23 13:34:00 +0000 |
|---|---|---|
| committer | cotton | 1998-10-23 13:34:00 +0000 |
| commit | deb5419010217c9d79602e8c9261e496ab855340 (patch) | |
| tree | 5bc6748b9f8f360af964df3b4f235f64b0699768 | |
| parent | 4f374e8529acc9f5fc4c700fc332789db142c15c (diff) | |
| download | mailman-deb5419010217c9d79602e8c9261e496ab855340.tar.gz mailman-deb5419010217c9d79602e8c9261e496ab855340.tar.zst mailman-deb5419010217c9d79602e8c9261e496ab855340.zip | |
robustified:
admindb assumed that there was the environmental variable
"PATH_INFO". If there is not, as would be the case if someone
visited <base-url>/admindb, then it would throw a key error.
Now it says that the user should specify a list name.
scott
| -rw-r--r-- | Mailman/Cgi/admindb.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Mailman/Cgi/admindb.py b/Mailman/Cgi/admindb.py index 4057ff007..06306430e 100644 --- a/Mailman/Cgi/admindb.py +++ b/Mailman/Cgi/admindb.py @@ -30,7 +30,13 @@ def main(): doc = htmlformat.Document() - path = os.environ['PATH_INFO'] + try: + path = os.environ['PATH_INFO'] + except KeyError: + doc.SetTitle("Admindb Error") + doc.AddItem(htmlformat.Header(2, "You must specify what list you are intenting to visit")) + print doc.Format(bgcolor="#ffffff") + sys.exit(0) list_info = Utils.GetPathPieces(path) |
