From 9da1fe95b61f89d2fee8512e96152e9bef27a006 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Sun, 10 Nov 2013 08:12:22 +0100 Subject: [PATCH] better logging for mismatching username/hostname --- nsupdate/api/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nsupdate/api/views.py b/nsupdate/api/views.py index 4f79e0e..f2ba56f 100644 --- a/nsupdate/api/views.py +++ b/nsupdate/api/views.py @@ -198,9 +198,9 @@ class NicUpdateView(View): # as we use update_username == hostname, we can fall back to that: hostname = username elif hostname != username: - # trying to update a hostname given in querystring that doesn't - # match the username, which is required for us! # maybe this host is owned by same person, but we can't know. + logger.info("rejecting to update wrong host %s (given in query string) " + "[instead of %s (given in basic auth)]" % (hostname, username)) return Response('nohost') # or 'badauth'? ipaddr = request.GET.get('myip') if ipaddr is None: