basic logging about messages from clients

This commit is contained in:
Seth Schoen 2012-11-18 21:31:00 -08:00
parent 9d1c0b8b19
commit 4c7126d0cd

View file

@ -233,6 +233,7 @@ class session(object):
recipient = m.request.recipient
csr = m.request.csr
sig = m.request.sig
self.log("new session from %s" % web.ctx.ip)
# Check whether we are the intended recipient of the request. Doing this
# before the hashcash check is more work for the server but gives a more
# helpful error message (because the hashcash will be wrong automatically
@ -314,6 +315,7 @@ class session(object):
r.proceed.polldelay = polldelay
def handleexistingsession(self, m, r):
self.log("received message from %s" % web.ctx.ip)
if m.request.IsInitialized():
self.die(r, r.BadRequest, uri="https://ca.example.com/failures/requestinexistingsession")
return