4 def generate_url(config
, obj
):
6 r
= RC4(md5
.md5("%s %s" % (s
, config
["urlkey"])).hexdigest())
7 a
= r
.crypt(obj
["user.password"])
8 b
= md5
.md5(md5
.md5("%s %s %s %s" % (config
["urlsecret"], obj
["user.username"], a
, s
)).hexdigest()).hexdigest()
9 obj
["url"] = "%s?m=%s&h=%s&u=%s&r=%s" % (config
["url"], a
.encode("hex"), b
, obj
["user.username"].encode("hex"), s
.encode("hex"))
19 "subject": "New account registration",
21 Thank you for registering.
23 Username: %(user.username)s
24 Please visit %(url)s to get your password.
27 2: { "subject": "Password request", "body": "Your password: %(user.password)s", }
,
28 3: { "subject": "New password", "body": "Your new password: %(user.password)s", }
,
29 5: { "subject": "Email change", "body": "Your old email address: %(prevemail)s", }
,