UNPKG

@aikidosec/firewall

Version:

Zen by Aikido is an embedded Web Application Firewall that autonomously protects Node.js apps against common and critical attacks

13 lines (12 loc) 388 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.containsUnsafePathParts = containsUnsafePathParts; const dangerousPathParts = ["../", "..\\"]; function containsUnsafePathParts(filePath) { for (const dangerousPart of dangerousPathParts) { if (filePath.includes(dangerousPart)) { return true; } } return false; }