Merge branch "dev" into branch "staging"#3111
Conversation
… multiple databases
…aurent minne's entries in documentation and code
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.31.10 to 4.32.0. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@cdefb33...b20883b) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: 4.32.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
…nkerity/bunkerweb-hello:v1.0 across documentation and configuration files
…/github/codeql-action-4.32.0
…ntegration documents
…ion files for better organization
…n and timezone offsets
…request body buffering behavior + lint files with precommit
| return ( | ||
| endpoint.startsWith("/") && | ||
| !endpoint.includes("://") && | ||
| !endpoint.trim().toLowerCase().startsWith("javascript:") && |
Check failure
Code scanning / CodeQL
Incomplete URL scheme check High
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 4 months ago
To fix the problem, extend the existing scheme check so that it also rejects data: and vbscript: schemes, in addition to javascript:. This keeps the current behavior (returning/allowing only “safe” endpoints) while closing the gap CodeQL identified.
Specifically, in src/ui/app/static/js/pages/unauthorized.js, inside isSafeEndpoint, we should modify the condition on line 13 to compute the lowercased, trimmed endpoint once (for clarity) and then reject if it starts with any of "javascript:", "data:", or "vbscript:". Because we can’t change behavior elsewhere, we’ll keep all existing checks (startsWith("/"), !includes("://"), etc.) and just expand the scheme-filtering logic. No new imports or helper functions are needed; all changes stay within the shown function.
| @@ -7,10 +7,13 @@ | ||
| if (typeof endpoint !== "string") return false; | ||
| // Only allow relative paths starting with / | ||
| // Disallow `:` or `//` to prevent scheme/protocol and protocol-relative URLs | ||
| const normalizedEndpoint = endpoint.trim().toLowerCase(); | ||
| return ( | ||
| endpoint.startsWith("/") && | ||
| !endpoint.includes("://") && | ||
| !endpoint.trim().toLowerCase().startsWith("javascript:") && | ||
| !normalizedEndpoint.startsWith("javascript:") && | ||
| !normalizedEndpoint.startsWith("data:") && | ||
| !normalizedEndpoint.startsWith("vbscript:") && | ||
| !endpoint.includes("<") && | ||
| !endpoint.includes(">") | ||
| ); |
No description provided.