From 7dd6fa0c6bd0727b65a00ddb629f165077e9eb95 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Tue, 8 Mar 2022 12:28:11 -0800 Subject: [PATCH] Fix for UTF8 in OTP QR code, #3745 --- meshuser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meshuser.js b/meshuser.js index 81bf6941..842dd255 100644 --- a/meshuser.js +++ b/meshuser.js @@ -3208,7 +3208,7 @@ module.exports.CreateMeshUser = function (parent, db, ws, req, args, domain, use var domainName = parent.certificates.CommonName; if (domain.dns != null) { domainName = domain.dns; } - ws.send(JSON.stringify({ action: 'otpauth-request', secret: secret, url: otplib.authenticator.keyuri(user.name, domainName, secret) })); + ws.send(JSON.stringify({ action: 'otpauth-request', secret: secret, url: otplib.authenticator.keyuri(encodeURIComponent(user.name), domainName, secret) })); } break; }