Attachment 'user.py.patch'

Download

   1 --- user.py	2005-12-21 18:41:58.000000000 +0100
   2 +++ user.py.rb	2006-01-22 17:47:07.453988904 +0100
   3 @@ -933,16 +933,34 @@
   4  
   5      def mailAccountData(self, cleartext_passwd=None):
   6          from MoinMoin.util import mail
   7 +        from MoinMoin.wikiutil import getSysPage
   8          _ = self._request.getText
   9  
  10 +        ### ReimarBauer 2006-01-22 
  11 +        ### empty password string replacement       
  12 +        ### uid in mail removed and replaced by the UserPreferences 
  13 +        if not self.enc_password :
  14 +            from random import randint
  15 +            import base64
  16 +    
  17 +            charset='utf-8'
  18 +            pwd = "%s%d" % (str(time.time()), randint(0,65535))
  19 +            pwd = pwd.encode(charset)
  20 +
  21 +            pwd = sha.new(pwd).digest()
  22 +            pwd = '{SHA}%s' % base64.encodestring(pwd).rstrip()
  23 +    
  24 +            self.enc_password = pwd
  25 +            self.save()
  26 +
  27          text = '\n' + _("""\
  28  Login Name: %s
  29  
  30  Login Password: %s
  31  
  32 -Login URL: %s/?action=userform&uid=%s
  33 +Login URL: %s/%s
  34  """, formatted=False) % (
  35 -                        self.name, self.enc_password, self._request.getBaseURL(), self.id)
  36 +                        self.name, self.enc_password, self._request.getBaseURL(),getSysPage(self._request, 'UserPreferences').page_name)
  37  
  38          text = _("""\
  39  Somebody has requested to submit your account data to this email address.

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2006-01-22 16:36:23, 1.3 KB) [[attachment:user.py.patch]]
  • [get | view] (2006-01-27 18:54:49, 3.0 KB) [[attachment:userform.py.patch]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.