diff --git a/cogs/yubicootp.py b/cogs/yubicootp.py index e777966..a5df8ed 100644 --- a/cogs/yubicootp.py +++ b/cogs/yubicootp.py @@ -92,7 +92,7 @@ class YubicoOTP(Cog): # Turn the fields to a python dict for easier parsing datafields = resptext.strip().split("\r\n") - datafields = {line[line.index("=") + 1]: line[:line.index("=")] for line in datafields} + datafields = {line[:line.index("=")]: line[line.index("=") + 1:] for line in datafields} # Verify nonce assert datafields["nonce"] == nonce