Skip to content

Percent-decode token in priompt:// connection URLs - #31

Closed
techkayacodes wants to merge 2 commits into
priompt:mainfrom
techkayacodes:fix/percent-decode-url-token
Closed

techkayacodes wants to merge 2 commits into
priompt:mainfrom
techkayacodes:fix/percent-decode-url-token

Conversation

@techkayacodes

Copy link
Copy Markdown

Summary

parseUrl() previously returned u.username raw without percent-decoding, causing base64 or special-character tokens escaped in priompt://<token>@host:port URLs (such as +, =, /) to be sent still percent-encoded in the Authorization header.

This updates parseUrl() to decode u.username with decodeURIComponent(u.username) (matching parseNatsUrl and the Go CLI) and adds unit test coverage in test/token.test.js for both PRIOMPT_URL and the url option.

Fixes #27

@sujal-maheshwari2004

Copy link
Copy Markdown
Member

Hi @techkayacodes, thank you for taking the time to send this. We're closing it, and it's not about the quality of the change.

The issue it fixes is labelled good first issue. In this organisation those are reserved for people making their first open-source contributions: we're onboarding a group of students who will learn the workflow on exactly these issues. We've now written this down in our contribution guide.

If you'd like to keep contributing, we'd welcome help on our help wanted issues. That's where experienced and AI-assisted effort makes a real difference. Please claim one by commenting, wait to be assigned before opening a pull request, and keep to at most two open pull requests at a time.

Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Percent-decode the token in priompt:// connection URLs

2 participants