Skip to content

Commit 3134728

Browse files
authored
Fix encodeURIComponent in otpauth URI (#570)
1 parent 63ea3e5 commit 3134728

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/components/Popup/EntryComponent.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,10 +261,12 @@ function getQrUrl(entry: OTPEntry) {
261261
"otpauth://" +
262262
type +
263263
"/" +
264-
label +
264+
encodeURIComponent(label) +
265265
"?secret=" +
266266
entry.secret +
267-
(entry.issuer ? "&issuer=" + entry.issuer.split("::")[0] : "") +
267+
(entry.issuer
268+
? "&issuer=" + encodeURIComponent(entry.issuer.split("::")[0])
269+
: "") +
268270
(entry.type === OTPType.hotp || entry.type === OTPType.hhex
269271
? "&counter=" + entry.counter
270272
: "") +

0 commit comments

Comments
 (0)