Skip to content

Merge branch "dev" into branch "staging"#3111

Merged
TheophileDiot merged 24 commits into
stagingfrom
dev
Jan 28, 2026
Merged

Merge branch "dev" into branch "staging"#3111
TheophileDiot merged 24 commits into
stagingfrom
dev

Conversation

@TheophileDiot
Copy link
Copy Markdown
Member

No description provided.

Anadris and others added 24 commits January 12, 2026 11:38
…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
…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

This check does not consider data: and vbscript:.

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.

Suggested changeset 1
src/ui/app/static/js/pages/unauthorized.js

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/src/ui/app/static/js/pages/unauthorized.js b/src/ui/app/static/js/pages/unauthorized.js
--- a/src/ui/app/static/js/pages/unauthorized.js
+++ b/src/ui/app/static/js/pages/unauthorized.js
@@ -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(">")
     );
EOF
@@ -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(">")
);
Copilot is powered by AI and may make mistakes. Always verify output.
Unable to commit as this autofix suggestion is now outdated
@TheophileDiot TheophileDiot merged commit a25ff76 into staging Jan 28, 2026
33 of 34 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.

3 participants