Verdaccio: webui: atob not support unicode strings

Created on 23 Jul 2018  路  3Comments  路  Source: verdaccio/verdaccio

Describe the bug
I use verdaccio-ldap for auth and the token payload has unicode strings. webui use atob decode payload will throw error.

https://github.com/verdaccio/verdaccio/blob/eecc98f6716331f88b83b9302ddd47b59fd9b75d/src/webui/components/Header/index.js#L111

I just replace atob with https://github.com/dankogai/js-base64 Base64.decode manually and it work well.

good first issue bug outdated

Most helpful comment

All 3 comments

atob has the problem with Unicode. Read it here https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding

Also, Implement the solution described in the above article.

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

roddy-toomim-sp picture roddy-toomim-sp  路  4Comments

juanpicado picture juanpicado  路  3Comments

ianschmitz picture ianschmitz  路  3Comments

rmi7 picture rmi7  路  4Comments

aprasadh picture aprasadh  路  3Comments