Skip to content

[PROD RELEASE V6]#122

Merged
kkartunov merged 2 commits into
masterfrom
dev
Nov 2, 2025
Merged

[PROD RELEASE V6]#122
kkartunov merged 2 commits into
masterfrom
dev

Conversation

@kkartunov

Copy link
Copy Markdown
Contributor

No description provided.

// Use the URL constructor to avoid path traversal/SSRF risks.
const baseUrl = TC_API_BASE.endsWith('/') ? TC_API_BASE.slice(0, -1) : TC_API_BASE;
const requestUrl = new URL(`/challenges/${challengeId}`, baseUrl).toString();
const requestUrl = `${TC_API_BASE}/challenges/${challengeId}`;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[❗❗ security]
The change from using the URL constructor to string concatenation for requestUrl reintroduces potential security risks such as path traversal or SSRF (Server-Side Request Forgery). Using the URL constructor helps mitigate these risks by ensuring proper URL parsing and construction. Consider reverting to the previous implementation using the URL constructor.

@kkartunov
kkartunov merged commit 1d59e4e into master Nov 2, 2025
8 checks passed
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.

2 participants