~ubuntu-branches/ubuntu/vivid/moin/vivid

« back to all changes in this revision

Viewing changes to MoinMoin/action/newaccount.py

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2014-01-07 21:33:21 UTC
  • mfrom: (0.1.34 sid)
  • Revision ID: package-import@ubuntu.com-20140107213321-574mr13z2oebjgms
Tags: 1.9.7-1ubuntu1
* Merge with Debian; remaining changes:
* debian/control:
  - remove python-xml from Suggests field, the package isn't in
    sys.path any more.
  - demote fckeditor from Recommends to Suggests; the code was previously
    embedded in moin, but it was also disabled, so there's no reason for us
    to pull this in by default currently. Note: fckeditor has a number of
    security problems and so this change probably needs to be carried
    indefinitely.

Show diffs side-by-side

added added

removed removed

Lines of Context:
98
98
            return _("Password not acceptable: %s") % wikiutil.escape(pw_error)
99
99
 
100
100
    # Encode password
101
 
    if password and not password.startswith('{SHA}'):
102
 
        try:
103
 
            theuser.enc_password = user.encodePassword(password)
104
 
        except UnicodeError, err:
105
 
            # Should never happen
106
 
            return "Can't encode password: %s" % wikiutil.escape(str(err))
 
101
    try:
 
102
        theuser.enc_password = user.encodePassword(request.cfg, password)
 
103
    except UnicodeError, err:
 
104
        # Should never happen
 
105
        return "Can't encode password: %s" % wikiutil.escape(str(err))
107
106
 
108
107
    # try to get the email, for new users it is required
109
108
    email = wikiutil.clean_input(form.get('email', ''))
135
134
    if request.cfg.require_email_verification:        
136
135
        if request.cfg.external_creation_check:
137
136
            p = subprocess.Popen([request.cfg.external_creation_check,
138
 
                                  theuser.name,
139
 
                                  theuser.email,
140
 
                                  theuser.account_creation_host], shell=False, stdin=None, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
 
137
                                  theuser.name.encode('utf-8'),
 
138
                                  theuser.email.encode('utf-8'),
 
139
                                  theuser.account_creation_host.encode('utf-8')], shell=False, stdin=None, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
141
140
            (create_error, ignored) = p.communicate(None)
142
141
            if create_error:
143
142
                return _("Account creation failed: %s." % create_error)