Skip to content

fix: use URL encoding for password and username#4

Merged
martinste1n merged 1 commit into
masterfrom
fix/url-encoded-pw
May 27, 2026
Merged

fix: use URL encoding for password and username#4
martinste1n merged 1 commit into
masterfrom
fix/url-encoded-pw

Conversation

@lrilling

Copy link
Copy Markdown
Collaborator

fixes problems with passwords or usernames containing special URL characters

fixes problems with passwords or usernames containing special URL characters
@lrilling lrilling requested review from Copilot and martinste1n June 17, 2025 12:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes the URL construction for the openware-config login by ensuring that special characters in the username and password are URL-encoded.

  • Updates type assertions for username and password.
  • Encodes username and password in the login URL to address encoding issues.

if (host && port && username && password) {
const url = `${host}:${port}/api/users/login?username=${username}&password=${password}`;
const url = `${host}:${port}/api/users/login?username=${encodeURIComponent(username)}&password=${encodeURIComponent(password)}`;
console.log("Refreshing session", url);

Copilot AI Jun 17, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logging the complete URL including encoded credentials may expose sensitive information. Consider removing or redacting sensitive details from the log statement.

Suggested change
console.log("Refreshing session", url);
console.log("Refreshing session at", `${host}:${port}/api/users/login`);

Copilot uses AI. Check for mistakes.
@martinste1n martinste1n merged commit c0ff23e into master May 27, 2026
1 check failed
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.

3 participants