MCPcopy Create free account
hub / github.com/OpenSIST/OpenSIST.github.io / hasUnsafeRedirectCharacter

Function hasUnsafeRedirectCharacter

src/Components/RouteUtils.js:10–15  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

8}
9
10function hasUnsafeRedirectCharacter(path) {
11 return Array.from(path).some((char) => {
12 const code = char.charCodeAt(0);
13 return char === "\\" || code <= 31 || code === 127;
14 });
15}
16
17export function safeLocalPath(path, fallbackPath = "/") {
18 if (

Callers 1

safeLocalPathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected