]> jfr.im git - irc/quakenet/newserv.git/blobdiff - chanserv/batcher/templates.py
CHANSERV: fix batcher rc4 burning in password urls
[irc/quakenet/newserv.git] / chanserv / batcher / templates.py
index 4eedd0a217f2af013d11da3d9d2691fbbf81ce27..648f39cddb913c974393d73238b111cb811d7361 100644 (file)
@@ -12,7 +12,7 @@ except ImportError:
 
 def generate_url(config, obj):
   s = os.urandom(4)
-  r = RC4(md5.md5("%s %s" % (s, config["urlkey"])).hexdigest())
+  r = RC4(md5.md5("%s %s" % (s, config["urlkey"])).hexdigest(), burn=0)
   a = r.crypt(obj["user.password"])
   b = md5.md5(md5.md5("%s %s %s %s" % (config["urlsecret"], obj["user.username"], a, s)).hexdigest()).hexdigest()
   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"))