1.) Don't allow agent auth to be disabled if running in prod
2.) fix ssrf in the fetch url 3.) fix path traversal vuln when uploading files 4.) added rate limiting to web socket upgrading (very needed) 5.) make token revocation from 5 seconds to 500 ms.
This commit is contained in:
@@ -140,7 +140,9 @@ const FILE_UPLOAD_PULL_TTL_MS = parsePositiveIntEnv(
|
||||
|
||||
function isSafeRemotePath(value: string): boolean {
|
||||
if (!value || value.length > 4096) return false;
|
||||
return !/[\x00-\x1F\x7F]/.test(value);
|
||||
if (/[\x00-\x1F\x7F]/.test(value)) return false;
|
||||
if (/(\.\.([\/\\]|$))/.test(value)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
async function serveDownloadById(
|
||||
|
||||
Reference in New Issue
Block a user