Skip to content
Browse files

Merge pull request #1502 from privacyidea/1501/more-debug-for-pin-length

Add more debug information for PIN length
  • Loading branch information...
plettich committed Mar 14, 2019
2 parents c89c545 + 10dd6ec commit 51f12d51bb234bd8f7f893d4263eb9b7cfb22e54
Showing with 5 additions and 0 deletions.
  1. +5 −0 privacyidea/lib/
@@ -1208,12 +1208,17 @@ def split_pin_pass(self, passw, user=None, options=None):
# The database field is always an integer
otplen = self.token.otplen
log.debug("Splitting the an OTP value of length {0!s} from the password.".format(otplen))
if get_prepend_pin():
pin = passw[0:-otplen]
otpval = passw[-otplen:]
log.debug("PIN prepended. PIN length is {0!s}, OTP length is {0!s}.".format(len(pin),
pin = passw[otplen:]
otpval = passw[0:otplen]
log.debug("PIN appended. PIN length is {0!s}, OTP length is {0!s}.".format(len(pin),

return True, pin, otpval

0 comments on commit 51f12d5

Please sign in to comment.
You can’t perform that action at this time.