liste yoneticisi wrote:
>
>I have two main questions.
>
>First; We once asked about adding password reminder to private archive
>login page. We tried some modifications but couldn't succeed. I copied the
>previous correspondence below.
>
>"""
>>Can I put the password reminder on private archive login page? So that,
>>list members who want to see the archive, but do not remember their
>>passwords, can quickly learn their passwords. Otherwise, password
>>reminder is too hard to find using the links on general list info page..
>
>
>This is a good idea. I think I'll implement it for Mailman 2.2.
>
>What needs to be done is the reminder button has to be added to the
>private.html archive login template and code needs to be added to
>Mailman/Cgi/private.py to recognize the button and send the reminder.
>
>You can look at Mailman/Cgi/options.py for how it's done there.
>"""
>
>
>I have added the following lines to
>PATH/mailman/Mailman/Cgi/private.py
>
>"
>        print Utils.maketext(
>            'private.html',
>            {'action'  : Utils.websafe(action),
>             'realname': mlist.real_name,
>             'message' : message,
>             }, mlist=mlist)
>        return
>
>### My Lines 7/4/2009 Eklenti baslangic
>
>    if cgidata.has_key('emailpw'):
>        mlist.MailUserPassword(user)
>        options_page(
>            mlist, doc, user, cpuser, userlang,
>            _('A reminder of your password has been emailed to you.'))
>        print doc.Format()
>        return
>### My Lines 7/4/2009 Eklenti bitis
>
>
>    lang = mlist.getMemberLanguage(username)
>    i18n.set_language(lang)
>    doc.set_language(lang)
>
>    # Authorization confirmed... output the desired file
>    try:
>        ctype, enc = guess_type(path, strict=0)
>
>"
>
>But nothing changed.:-(


There are several things wrong with the above.

You have copied the wrong code from options.py. That code processes the
reminder button from the logged-in options page (I'm not sure why
there is a reminder there, but the list admin could use it to send a
reminder to the user). You want the code that follows the comment

    # Are we processing a password reminder from the login screen?

but if you copy it verbatim as you did with the other, you'll have the
problem that it calls the function loginpage() just as the above calls
options_page() and those functions are local to the options.py module
and undefined in private.py. You don't want to call either of those.

The final problem is you've inserted your code in the wrong place. You
put it where it is only reached if the user is already authenticated
or provided a valid authentication.


>What else can we do about it?


Find someone who knows some Python to do this for you.


You can try the insert in the attached reminder.txt file, but note that
this is untested and may cause problems.


>Mailman version is 2.1.9
>
>--------------------
>
>The second question is about vesion upgrade.
>
>Mailman, in our system, is running on Debian.
>Python version is 2.4.4
>
>I heard that 2.1.12 doesn't work properly on 2.4.4 but I am informed that
>the newer version of Python  doesn't exist on Debian Package.
>It seems difficult to upgrade under these circumstances.
>
>What are the major differences between the Mailman versions 2.1.9 and
>2.1.12 with regard to security, usability?


See
<http://bazaar.launchpad.net/%7Emailman-coders/mailman/2.1/annotate/head%3A/NEWS>

-- 
Mark Sapiro <m...@msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

    if not mlist.WebAuthenticate((mm_cfg.AuthUser,
                                  mm_cfg.AuthListModerator,
                                  mm_cfg.AuthListAdmin,
                                  mm_cfg.AuthSiteAdmin),
                                 password, username):
        if cgidata.has_key('submit'):
            # This is a re-authorization attempt
            message = Bold(FontSize('+1', _('Authorization failed.'))).Format()
--------------------------------------------
        # Are we processing a password reminder from the login screen?
        if cgidata.has_key('login-remind'):
            if mlist.isMember(user):
                mlist.MailUserPassword(user)
                message = Bold(FontSize('+1', _("""If you are a list member,
                            your password has been emailed to 
you."""))).Format()
            else:
                # Not a member
                if mlist.private_roster == 0:
                    # Public rosters
                    safeuser = Utils.websafe(user)
                    message = Bold(FontSize('+1',
                                   _('No such member: %(safeuser)s.'))).Format()
                else:
                    syslog('mischief',
                           'Reminder attempt of non-member w/ private rosters: 
%s',
                           user)
--------------------------------------------
        # Output the password form
------------------------------------------------------
Mailman-Users mailing list
Mailman-Users@python.org
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Security Policy: http://wiki.list.org/x/QIA9

Reply via email to