mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/OATHAuth
synced 2024-11-28 02:00:06 +00:00
Add URL encoding to TOTP QR code URL
Add RFC 3986 URI encoding to the account label in accordance with the Google Authenticator specification to ensure the QR code is properly generated for usernames with special characters in them. Bug: T136269 Change-Id: I18175c9a3c9a45346fa7a227a5209194385c6696
This commit is contained in:
parent
079877734c
commit
7b8a68fd5a
|
@ -83,8 +83,8 @@ class SpecialOATHEnable extends FormSpecialPage {
|
|||
new XmlJsCode(
|
||||
'function () {'
|
||||
. '$("#qrcode").qrcode("otpauth://totp/'
|
||||
. $this->OATHUser->getAccount()
|
||||
. '?secret=' . $secret. '");'
|
||||
. rawurlencode( $this->OATHUser->getAccount() )
|
||||
. '?secret=' . $secret . '");'
|
||||
. '}'
|
||||
)
|
||||
) )
|
||||
|
|
Loading…
Reference in a new issue