Steffen
Well-known member
- Affected version
- 2.0.5
If a username contains a special character like for example a question mark then XenForo generates an invalid OTP URL. You can try this for example with the username "Steffen?". When scanning the QR code, Google Authenticator for Android complains that the key wasn't recognized ("Schlüssel wurde nicht erkannt").
Notice the double question mark in the following JavaScript code generated by XenForo. The first question mark needs to be URL-encoded.
It should look like this:
I think this is a bug in the OTP library used by XenForo: https://github.com/ChristianRiesen/otp/pull/29
Notice the double question mark in the following JavaScript code generated by XenForo. The first question mark needs to be URL-encoded.
JavaScript:
$el.qrcode({
text: 'otpauth://totp/My%20Forum%3A%20Steffen??secret=...&issuer=My%20Forum'
});
It should look like this:
JavaScript:
$el.qrcode({
text: 'otpauth://totp/My%20Forum%3A%20Steffen%3F?secret=...&issuer=My%20Forum'
});
I think this is a bug in the OTP library used by XenForo: https://github.com/ChristianRiesen/otp/pull/29