summaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
authorLV-426 <lv-426@taproot.org.il>2015-02-11 00:03:57 +0200
committerLV-426 <lv-426@taproot.org.il>2015-02-11 00:03:57 +0200
commit72ed3b7b455578e8e74f0adc110e5045b359e3d6 (patch)
tree70f9a044aee4229f28260de73f9188ef2ba61165 /src/server
parent0d30f62ca209772dfbb0a8e716300b01892036ca (diff)
rz_user.py: log activation failures
Diffstat (limited to 'src/server')
-rw-r--r--src/server/rz_user.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/server/rz_user.py b/src/server/rz_user.py
index 15ab515b..a8c176da 100644
--- a/src/server/rz_user.py
+++ b/src/server/rz_user.py
@@ -62,10 +62,10 @@ def activate_user_account(us_req):
try:
existing_account = user_db.lookup_user__by_email_address(us_req['email_address'])
except Exception as _:
- pass # thrown if user was not found
+ pass # thrown if user was not found, expected
if None != existing_account:
- raise Exception('account activation code reused: existing-account: %s' % (existing_account))
+ raise Exception('account activation code reused: existing-account: %s' % (existing_account.email_address))
# calc pw hash
pw_plaintxt = us_req['pw_plaintxt']
@@ -240,11 +240,13 @@ def rest__user_signup():
if other_req_v_tok == v_tok:
if us_req.has_expired(): # check again whether request has expired
+ log.warning('user signup: attempt to activate expired signup request: email: %s' % (us_req['email_address']))
return render_template('user_signup.html', state='activation_failure')
try:
activate_user_account(us_req)
except Exception as e:
+ log.exception(e)
return render_template('user_signup.html', state='activation_failure')
# activation success