mirror of
https://github.com/fosrl/pangolin.git
synced 2026-10-14 16:49:05 +02:00
Merge branch 'main' into dev
This commit is contained in:
@@ -299,7 +299,7 @@ jobs:
|
||||
shell: bash
|
||||
|
||||
- name: Upload artifacts from /install/bin
|
||||
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
||||
with:
|
||||
name: install-bin
|
||||
path: install/bin/
|
||||
|
||||
@@ -31,7 +31,7 @@ jobs:
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
||||
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
||||
with:
|
||||
# Match the version the app ships on (Dockerfile /
|
||||
# Dockerfile.dev both use 24.18.1) rather than floating
|
||||
|
||||
@@ -17,7 +17,7 @@ jobs:
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
- name: Install Node
|
||||
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
||||
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
|
||||
with:
|
||||
# Pin to the version the app actually ships on (Dockerfile /
|
||||
# Dockerfile.dev both use 24.18.1; .nvmrc pins the 24 major).
|
||||
|
||||
Generated
+1203
-725
File diff suppressed because it is too large
Load Diff
+54
-54
@@ -33,42 +33,42 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@asteasolutions/zod-to-openapi": "9.1.0",
|
||||
"@aws-sdk/client-s3": "3.1131.0",
|
||||
"@aws-sdk/client-s3": "3.1148.0",
|
||||
"@devolutions/iron-remote-desktop": "https://static.pangolin.net/packages/devolutions-iron-remote-desktop-0.0.0.tgz",
|
||||
"@devolutions/iron-remote-desktop-rdp": "https://static.pangolin.net/packages/devolutions-iron-remote-desktop-rdp-0.0.1.tgz",
|
||||
"@headlessui/react": "2.2.10",
|
||||
"@hookform/resolvers": "5.9.1",
|
||||
"@monaco-editor/react": "4.7.0",
|
||||
"@node-rs/argon2": "2.2.1",
|
||||
"@node-rs/argon2": "2.2.2",
|
||||
"@novnc/novnc": "^1.7.0",
|
||||
"@oslojs/crypto": "1.0.1",
|
||||
"@oslojs/encoding": "1.1.0",
|
||||
"@radix-ui/react-avatar": "1.2.6",
|
||||
"@radix-ui/react-checkbox": "1.3.11",
|
||||
"@radix-ui/react-collapsible": "1.1.20",
|
||||
"@radix-ui/react-dialog": "1.1.23",
|
||||
"@radix-ui/react-dropdown-menu": "2.1.24",
|
||||
"@radix-ui/react-avatar": "1.2.7",
|
||||
"@radix-ui/react-checkbox": "1.3.12",
|
||||
"@radix-ui/react-collapsible": "1.1.21",
|
||||
"@radix-ui/react-dialog": "1.2.0",
|
||||
"@radix-ui/react-dropdown-menu": "2.1.25",
|
||||
"@radix-ui/react-icons": "1.3.2",
|
||||
"@radix-ui/react-label": "2.1.15",
|
||||
"@radix-ui/react-popover": "1.1.23",
|
||||
"@radix-ui/react-progress": "1.1.16",
|
||||
"@radix-ui/react-radio-group": "1.4.7",
|
||||
"@radix-ui/react-scroll-area": "1.2.18",
|
||||
"@radix-ui/react-select": "2.3.7",
|
||||
"@radix-ui/react-separator": "1.1.15",
|
||||
"@radix-ui/react-slot": "1.3.3",
|
||||
"@radix-ui/react-switch": "1.3.7",
|
||||
"@radix-ui/react-tabs": "1.1.21",
|
||||
"@radix-ui/react-toast": "1.2.23",
|
||||
"@radix-ui/react-tooltip": "1.2.16",
|
||||
"@radix-ui/react-label": "2.1.16",
|
||||
"@radix-ui/react-popover": "1.2.0",
|
||||
"@radix-ui/react-progress": "1.1.17",
|
||||
"@radix-ui/react-radio-group": "1.4.8",
|
||||
"@radix-ui/react-scroll-area": "1.3.0",
|
||||
"@radix-ui/react-select": "2.3.8",
|
||||
"@radix-ui/react-separator": "1.1.16",
|
||||
"@radix-ui/react-slot": "1.4.0",
|
||||
"@radix-ui/react-switch": "1.3.8",
|
||||
"@radix-ui/react-tabs": "1.1.22",
|
||||
"@radix-ui/react-toast": "1.2.24",
|
||||
"@radix-ui/react-tooltip": "1.3.0",
|
||||
"@react-email/body": "0.3.0",
|
||||
"@react-email/components": "1.0.12",
|
||||
"@react-email/render": "2.1.0",
|
||||
"@react-email/tailwind": "2.0.7",
|
||||
"@simplewebauthn/browser": "14.0.0",
|
||||
"@simplewebauthn/server": "14.0.1",
|
||||
"@simplewebauthn/server": "14.0.3",
|
||||
"@tailwindcss/forms": "0.5.11",
|
||||
"@tanstack/react-query": "5.102.8",
|
||||
"@tanstack/react-query": "5.104.1",
|
||||
"@tanstack/react-table": "8.21.3",
|
||||
"@xterm/addon-fit": "^0.11.0",
|
||||
"@xterm/addon-web-links": "^0.12.0",
|
||||
@@ -86,9 +86,9 @@
|
||||
"crypto-js": "4.2.0",
|
||||
"d3": "7.9.0",
|
||||
"dns-packet": "^5.6.1",
|
||||
"drizzle-orm": "0.45.2",
|
||||
"drizzle-orm": "0.45.4",
|
||||
"express": "5.2.1",
|
||||
"express-rate-limit": "8.7.0",
|
||||
"express-rate-limit": "8.7.1",
|
||||
"glob": "13.0.6",
|
||||
"gpt-tokenizer": "^4.0.0",
|
||||
"helmet": "8.3.0",
|
||||
@@ -96,34 +96,34 @@
|
||||
"input-otp": "1.5.0",
|
||||
"ioredis": "6.0.0",
|
||||
"jmespath": "0.16.0",
|
||||
"js-yaml": "5.4.1",
|
||||
"js-yaml": "5.4.3",
|
||||
"jsonwebtoken": "9.0.3",
|
||||
"lru-cache": "11.5.2",
|
||||
"lucide-react": "1.45.0",
|
||||
"lru-cache": "11.5.3",
|
||||
"lucide-react": "1.53.0",
|
||||
"maxmind": "5.0.7",
|
||||
"moment": "2.31.0",
|
||||
"next": "16.3.6",
|
||||
"next-intl": "4.14.4",
|
||||
"next": "16.4.0",
|
||||
"next-intl": "4.14.9",
|
||||
"next-themes": "0.4.6",
|
||||
"nextjs-toploader": "3.9.17",
|
||||
"nodemailer": "10.0.9",
|
||||
"nodemailer": "10.0.16",
|
||||
"oslo": "1.2.1",
|
||||
"pg": "8.23.0",
|
||||
"posthog-node": "5.52.1",
|
||||
"pg": "8.23.1",
|
||||
"posthog-node": "5.55.1",
|
||||
"qrcode.react": "4.2.0",
|
||||
"react": "19.3.0",
|
||||
"react-day-picker": "10.0.1",
|
||||
"react-day-picker": "10.0.2",
|
||||
"react-dom": "19.3.0",
|
||||
"react-easy-sort": "1.8.0",
|
||||
"react-hook-form": "7.88.0",
|
||||
"react-hook-form": "7.89.0",
|
||||
"react-icons": "5.7.0",
|
||||
"recharts": "3.10.1",
|
||||
"reodotdev": "1.1.0",
|
||||
"semver": "7.8.5",
|
||||
"sshpk": "1.18.0",
|
||||
"stripe": "22.6.2",
|
||||
"stripe": "23.0.0",
|
||||
"swagger-ui-express": "5.0.1",
|
||||
"tailwind-merge": "3.6.0",
|
||||
"tailwind-merge": "3.7.0",
|
||||
"topojson-client": "3.1.0",
|
||||
"tw-animate-css": "1.4.0",
|
||||
"use-debounce": "10.1.1",
|
||||
@@ -132,18 +132,18 @@
|
||||
"visionscarto-world-atlas": "1.0.0",
|
||||
"winston": "3.19.0",
|
||||
"winston-daily-rotate-file": "5.0.0",
|
||||
"ws": "8.21.3",
|
||||
"ws": "8.22.0",
|
||||
"yaml": "2.9.1",
|
||||
"yargs": "18.1.0",
|
||||
"zod": "4.6.2",
|
||||
"yargs": "18.2.0",
|
||||
"zod": "4.6.5",
|
||||
"zod-validation-error": "5.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@dotenvx/dotenvx": "2.24.1",
|
||||
"@dotenvx/dotenvx": "2.34.1",
|
||||
"@esbuild-plugins/tsconfig-paths": "0.1.2",
|
||||
"@react-email/ui": "^6.9.5",
|
||||
"@react-email/ui": "^6.11.1",
|
||||
"@tailwindcss/postcss": "4.3.3",
|
||||
"@tanstack/react-query-devtools": "5.102.8",
|
||||
"@tanstack/react-query-devtools": "5.104.1",
|
||||
"@types/better-sqlite3": "7.6.13",
|
||||
"@types/cookie-parser": "1.4.10",
|
||||
"@types/cors": "2.8.19",
|
||||
@@ -155,8 +155,8 @@
|
||||
"@types/jmespath": "0.15.2",
|
||||
"@types/js-yaml": "4.0.9",
|
||||
"@types/jsonwebtoken": "9.0.10",
|
||||
"@types/node": "26.5.1",
|
||||
"@types/nodemailer": "8.0.1",
|
||||
"@types/node": "26.6.4",
|
||||
"@types/nodemailer": "8.0.2",
|
||||
"@types/nprogress": "0.2.3",
|
||||
"@types/pg": "8.23.1",
|
||||
"@types/react": "19.3.0",
|
||||
@@ -165,26 +165,26 @@
|
||||
"@types/sshpk": "1.17.5",
|
||||
"@types/swagger-ui-express": "4.1.8",
|
||||
"@types/topojson-client": "3.1.5",
|
||||
"@types/ws": "8.18.1",
|
||||
"@types/ws": "8.18.2",
|
||||
"@types/yargs": "17.0.35",
|
||||
"babel-plugin-react-compiler": "1.0.0",
|
||||
"drizzle-kit": "0.31.10",
|
||||
"drizzle-kit": "0.31.11",
|
||||
"esbuild": "0.28.2",
|
||||
"esbuild-node-externals": "2.0.0",
|
||||
"eslint": "10.10.0",
|
||||
"eslint-config-next": "16.3.5",
|
||||
"postcss": "8.5.28",
|
||||
"prettier": "3.9.6",
|
||||
"react-email": "6.9.5",
|
||||
"eslint": "10.12.0",
|
||||
"eslint-config-next": "16.4.0",
|
||||
"postcss": "8.5.29",
|
||||
"prettier": "3.9.9",
|
||||
"react-email": "6.11.1",
|
||||
"tailwindcss": "4.3.3",
|
||||
"tsc-alias": "1.9.5",
|
||||
"tsx": "4.23.13",
|
||||
"tsc-alias": "1.9.7",
|
||||
"tsx": "4.23.15",
|
||||
"typescript": "7.0.2",
|
||||
"typescript-eslint": "8.70.0"
|
||||
"typescript-eslint": "8.71.1"
|
||||
},
|
||||
"overrides": {
|
||||
"esbuild": "0.28.2",
|
||||
"dompurify": "3.4.0",
|
||||
"postcss": "8.5.28"
|
||||
"postcss": "8.5.29"
|
||||
}
|
||||
}
|
||||
|
||||
+32
-50
@@ -1,5 +1,3 @@
|
||||
const MAX_RECURSION_DEPTH = 100;
|
||||
|
||||
const segmentRegexCache = new Map<string, RegExp>();
|
||||
|
||||
function getSegmentRegex(patternPart: string): RegExp {
|
||||
@@ -56,55 +54,39 @@ export function isPathAllowed(pattern: string, path: string): boolean {
|
||||
const patternParts = decodeAndResolvePath(pattern);
|
||||
const pathParts = decodeAndResolvePath(path);
|
||||
|
||||
function matchSegments(
|
||||
patternIndex: number,
|
||||
pathIndex: number,
|
||||
depth: number = 0
|
||||
): boolean {
|
||||
if (depth > MAX_RECURSION_DEPTH) {
|
||||
return false;
|
||||
}
|
||||
// Iterative dynamic-programming matcher. The previous recursive
|
||||
// implementation forked on every bare `*`, which backtracked
|
||||
// exponentially and let an unauthenticated path rule pin the event loop.
|
||||
// `dp[i][j]` is true when patternParts[i..] matches pathParts[j..].
|
||||
const m = patternParts.length;
|
||||
const n = pathParts.length;
|
||||
const dp: boolean[][] = Array.from({ length: m + 1 }, () =>
|
||||
new Array<boolean>(n + 1).fill(false)
|
||||
);
|
||||
|
||||
const currentPatternPart = patternParts[patternIndex];
|
||||
const currentPathPart = pathParts[pathIndex];
|
||||
|
||||
if (patternIndex >= patternParts.length) {
|
||||
return pathIndex >= pathParts.length;
|
||||
}
|
||||
|
||||
if (pathIndex >= pathParts.length) {
|
||||
return patternParts.slice(patternIndex).every((p) => p === "*");
|
||||
}
|
||||
|
||||
if (currentPatternPart === "*") {
|
||||
if (matchSegments(patternIndex + 1, pathIndex, depth + 1)) {
|
||||
return true;
|
||||
}
|
||||
if (matchSegments(patternIndex, pathIndex + 1, depth + 1)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
if (currentPatternPart.includes("*")) {
|
||||
const regex = getSegmentRegex(currentPatternPart);
|
||||
|
||||
if (regex.test(currentPathPart)) {
|
||||
return matchSegments(
|
||||
patternIndex + 1,
|
||||
pathIndex + 1,
|
||||
depth + 1
|
||||
);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
if (currentPatternPart !== currentPathPart) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return matchSegments(patternIndex + 1, pathIndex + 1, depth + 1);
|
||||
dp[m][n] = true;
|
||||
for (let j = 0; j < n; j++) {
|
||||
dp[m][j] = false;
|
||||
}
|
||||
for (let i = m - 1; i >= 0; i--) {
|
||||
dp[i][n] = patternParts.slice(i).every((p) => p === "*");
|
||||
}
|
||||
|
||||
return matchSegments(0, 0, 0);
|
||||
for (let i = m - 1; i >= 0; i--) {
|
||||
const currentPatternPart = patternParts[i];
|
||||
for (let j = n - 1; j >= 0; j--) {
|
||||
if (currentPatternPart === "*") {
|
||||
// match zero segments, or consume one path segment
|
||||
dp[i][j] = dp[i + 1][j] || dp[i][j + 1];
|
||||
} else if (currentPatternPart.includes("*")) {
|
||||
const regex = getSegmentRegex(currentPatternPart);
|
||||
dp[i][j] = regex.test(pathParts[j]) && dp[i + 1][j + 1];
|
||||
} else {
|
||||
dp[i][j] =
|
||||
currentPatternPart === pathParts[j] && dp[i + 1][j + 1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return dp[0][0];
|
||||
}
|
||||
|
||||
@@ -97,6 +97,7 @@ export const handleOlmServerInitAddPeerHandshake: MessageHandler = async (
|
||||
logger.warn(
|
||||
`handleOlmServerInitAddPeerHandshake: Multiple resources found matching the criteria`
|
||||
);
|
||||
await sendCancel();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ export default async function Page(props: {
|
||||
let inviteToken;
|
||||
if (searchParams.redirect && isInvite) {
|
||||
const parts = searchParams.redirect.split("token=");
|
||||
if (parts.length) {
|
||||
if (parts.length > 1) {
|
||||
const token = parts[1];
|
||||
const tokenParts = token.split("-");
|
||||
if (tokenParts.length === 2) {
|
||||
|
||||
Reference in New Issue
Block a user