diff options
| author | bwarsaw | 2000-09-15 20:45:40 +0000 |
|---|---|---|
| committer | bwarsaw | 2000-09-15 20:45:40 +0000 |
| commit | 31cc5618d9d7d823b373fadede48cbdf737891fd (patch) | |
| tree | 90be78ad009beaa84d65dd04db3b0a3b60e743fd | |
| parent | a282e91c97524f062dc340ea64b925bad088d8af (diff) | |
| download | mailman-31cc5618d9d7d823b373fadede48cbdf737891fd.tar.gz mailman-31cc5618d9d7d823b373fadede48cbdf737891fd.tar.zst mailman-31cc5618d9d7d823b373fadede48cbdf737891fd.zip | |
loginpage(): Use full-on red for errors.
authenticate(): Because admin.py now tells cgi.FieldStorage to
keep_blank_values (necessary to fix other bugs), it isn't enough to
test just for presence of the `adminpw' key. The key's value must
also be non-empty. Not a great solution, but the best we can do right
now.
Yes, this means that empty admin keys aren't allowed.
| -rw-r--r-- | Mailman/Cgi/Auth.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Mailman/Cgi/Auth.py b/Mailman/Cgi/Auth.py index 7d507f634..bf356d1c4 100644 --- a/Mailman/Cgi/Auth.py +++ b/Mailman/Cgi/Auth.py @@ -38,7 +38,7 @@ def loginpage(mlist, scriptname, msg='', frontpage=None): else: actionurl = Utils.GetRequestURI(url) if msg: - msg = FontAttr(msg, color='#FF5060', size='+1').Format() + msg = FontAttr(msg, color='#ff0000', size='+1').Format() print 'Content-type: text/html\n' print Utils.maketext( # Should really be admlogin.html :/ @@ -62,7 +62,10 @@ def authenticate(mlist, cgidata): # out. The idea is to set only one cookie when the admin password # changes. The new cookie is necessary, because the checksum part of the # cookie is based on (among other things) the list's admin password. - if cgidata.has_key('adminpw') and not cgidata.has_key('newpw'): + if cgidata.has_key('adminpw') and \ + cgidata['adminpw'].value and \ + not cgidata.has_key('newpw'): + # then adminpw = cgidata['adminpw'].value # Attempt to authenticate try: |
