Giter VIP home page Giter VIP logo

Comments (2)

nakedible-p avatar nakedible-p commented on July 17, 2024

Added some debugging prints to source code and tested this. The error comes from base64 decoding:

str is: eyI_IjoiYWE_In0
output is: eyI/IjoiYWE_In0=
app.js:12 ERROR IS: DOMException: Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded. {message: "Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.", name: "InvalidCharacterError", code: 5, stack: "Error: Failed to execute 'atob' on 'Window': The s…t b (http://localhost:8000/dist/js/app.js:4:9676)", INDEX_SIZE_ERR: 1…}code: 5message: "Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded."name: "InvalidCharacterError"stack: "Error: Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.↵ at Error (native)↵ at url_base64_decode (http://localhost:8000/dist/js/app.js:2:5907)↵ at window.decode (http://localhost:8000/dist/js/app.js:12:5780)↵ at d (http://localhost:8000/dist/js/app.js:12:7527)↵ at a.signal (http://localhost:8000/dist/js/app.js:6:29153)↵ at Vb (http://localhost:8000/dist/js/app.js:4:6439)↵ at jc (http://localhost:8000/dist/js/app.js:4:11226)↵ at b (http://localhost:8000/dist/js/app.js:4:9676)"**proto**: DOMException

For some reason, string.replace('_','/') manages to replace only the first occurence. It would also seem that this is translated to string.replace(/_/g,'/') by some js preprocessing step.

from jsonwebtoken.github.io.

nakedible-p avatar nakedible-p commented on July 17, 2024

Actually no! Some other part of source code had string.replace(/_/g,'/'), this one is kept as string.replace('_','/') which indeed replaces only the first occurence. I will make a pull to fix this.

from jsonwebtoken.github.io.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.