Skip to content

Fix/redis password url encoding#570

Closed
tharu-jwd wants to merge 2 commits intocameri:mainfrom
tharu-jwd:fix/redis-password-url-encoding
Closed

Fix/redis password url encoding#570
tharu-jwd wants to merge 2 commits intocameri:mainfrom
tharu-jwd:fix/redis-password-url-encoding

Conversation

@tharu-jwd
Copy link
Copy Markdown

Description

Wrap REDIS_PASSWORD with encodeURIComponent when building the fallback Redis URL.

Related Issue

Fixes #569

Motivation and Context

If REDIS_PASSWORD contains #, Node's URL parser treats it as a fragment and throws TypeError: Invalid URL. The relay fails to start with no useful error message. encodeURIComponent handles # and any other special characters safely.

How Has This Been Tested?

Verified locally that new URL() throws with a raw # in the password and succeeds after percent encoding it.

Screenshots (if appropriate):

N/A

Types of changes

  • Non-functional change (docs, style, minor refactor)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my code changes.
  • I added a changeset, or this is docs-only and I added an empty changeset.
  • All new and existing tests passed.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 22, 2026

🦋 Changeset detected

Latest commit: 5240bd8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
nostream Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Justxd22
Copy link
Copy Markdown
Collaborator

duplicate #545

@tharu-jwd
Copy link
Copy Markdown
Author

Closing since #545 is a broad fix

@tharu-jwd tharu-jwd closed this Apr 23, 2026
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.

[BUG] Relay crashes on startup if Redis password contains #

2 participants