Fix for UTF8 in OTP QR code, #3745

Ylian Saint-Hilaire committed Mar 8, 2022 at 12:28 UTC 7dd6fa0c6bd0727b65a00ddb629f165077e9eb95
1 file changed +1 -1
meshuser.js
+1 -1
@@ -3208,7 +3208,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use
3208
3209 var domainName = parent.certificates.CommonName;
3210 if (domain.dns != null) { domainName = domain.dns; }
3211 - ws.send(JSON.stringify({ action: 'otpauth-request', secret: secret, url: otplib.authenticator.keyuri(user.name, domainName, secret) }));
3211 + ws.send(JSON.stringify({ action: 'otpauth-request', secret: secret, url: otplib.authenticator.keyuri(encodeURIComponent(user.name), domainName, secret) }));
3212 }
3213 break;
3214 }