mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/OATHAuth
synced 2024-11-30 19:14:31 +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
|
@ -82,9 +82,9 @@ class SpecialOATHEnable extends FormSpecialPage {
|
||||||
array( 'ext.oathauth' ),
|
array( 'ext.oathauth' ),
|
||||||
new XmlJsCode(
|
new XmlJsCode(
|
||||||
'function () {'
|
'function () {'
|
||||||
. '$("#qrcode").qrcode("otpauth://totp/'
|
. '$("#qrcode").qrcode("otpauth://totp/'
|
||||||
. $this->OATHUser->getAccount()
|
. rawurlencode( $this->OATHUser->getAccount() )
|
||||||
. '?secret=' . $secret. '");'
|
. '?secret=' . $secret . '");'
|
||||||
. '}'
|
. '}'
|
||||||
)
|
)
|
||||||
) )
|
) )
|
||||||
|
|
Loading…
Reference in a new issue