Parent5446 has uploaded a new change for review.
https://gerrit.wikimedia.org/r/290965
Change subject: Add URL encoding to TOTP QR code URL
......................................................................
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
---
M special/SpecialOATHEnable.php
1 file changed, 3 insertions(+), 3 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OATHAuth
refs/changes/65/290965/1
diff --git a/special/SpecialOATHEnable.php b/special/SpecialOATHEnable.php
index a6e9290..02845ff 100644
--- a/special/SpecialOATHEnable.php
+++ b/special/SpecialOATHEnable.php
@@ -82,9 +82,9 @@
array( 'ext.oathauth' ),
new XmlJsCode(
'function () {'
- . '$("#qrcode").qrcode("otpauth://totp/'
- . $this->OATHUser->getAccount()
- . '?secret=' . $secret. '");'
+ . '$("#qrcode").qrcode("otpauth://totp/'
+ . rawurlencode(
$this->OATHUser->getAccount() )
+ . '?secret=' . $secret . '");'
. '}'
)
) )
--
To view, visit https://gerrit.wikimedia.org/r/290965
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I18175c9a3c9a45346fa7a227a5209194385c6696
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OATHAuth
Gerrit-Branch: master
Gerrit-Owner: Parent5446 <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits