mirror of
https://github.com/certbot/certbot.git
synced 2026-07-30 16:14:44 +02:00
log IP address that payments come from
This commit is contained in:
@@ -26,6 +26,9 @@ class shortform(object):
|
|||||||
def hexdigit(s):
|
def hexdigit(s):
|
||||||
return s in "0123456789abcdef"
|
return s in "0123456789abcdef"
|
||||||
|
|
||||||
|
def log(msg):
|
||||||
|
r.publish("logs", msg)
|
||||||
|
|
||||||
class payment(object):
|
class payment(object):
|
||||||
def GET(self, session):
|
def GET(self, session):
|
||||||
web.header("Content-type", "text/html")
|
web.header("Content-type", "text/html")
|
||||||
@@ -38,6 +41,7 @@ class payment(object):
|
|||||||
r.publish("payments", session)
|
r.publish("payments", session)
|
||||||
names = r.lrange("%s:names" % session, 0, -1)
|
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>'
|
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:
|
with open("thanks.html","r") as f:
|
||||||
return f.read() % (session, names_list)
|
return f.read() % (session, names_list)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user