mirror of
https://github.com/whyour/qinglong.git
synced 2026-10-16 22:35:32 +08:00
* fix: harden scoped API inputs and isolate login throttling * fix: close script path gaps and harden security boundaries * fix: preserve subscription aliases and avoid extension eval * fix: allow cancelling invalid historical subscriptions * fix: make script parent validation explicit for CodeQL * fix: limit command execution and clarify trusted path branches * fix: separate diff tool script access from config APIs * fix: clean up obsolete subscription SSH credentials
12 lines
383 B
TypeScript
12 lines
383 B
TypeScript
import { resolveFileAccess } from './fileAccess';
|
|
|
|
/** Check stored paths too: old database rows are not trusted input. */
|
|
export function resolveLogPath(root: string, value: string): string {
|
|
const target = resolveFileAccess(root, [value]);
|
|
if (!target)
|
|
throw Object.assign(new Error('Log path is outside the log directory'), {
|
|
status: 400,
|
|
});
|
|
return target;
|
|
}
|