1
0
mirror of https://github.com/certbot/certbot.git synced 2026-01-26 07:41:33 +03:00

log IP address that payments come from

This commit is contained in:
Seth Schoen
2012-11-18 22:21:06 -08:00
parent d55b871e9f
commit e3dbe1a60f

View File

@@ -26,6 +26,9 @@ class shortform(object):
def hexdigit(s):
return s in "0123456789abcdef"
def log(msg):
r.publish("logs", msg)
class payment(object):
def GET(self, session):
web.header("Content-type", "text/html")
@@ -38,6 +41,7 @@ class payment(object):
r.publish("payments", session)
names = r.lrange("%s:names" % session, 0, -1)
names_list = '<ul style="font-family:monospace">' + "\n".join("<li>%s</li>" % n for n in names) + '</ul>'
log("received valid payment details from %s" % web.ctx.ip)
with open("thanks.html","r") as f:
return f.read() % (session, names_list)