/** * File Organizer MCP Server v3.4.2 * Archive Validation Utility * * Provides: * - Magic number verification for archive file types * - Zip-slip attack prevention * - Path containment verification */ export interface ArchiveValidationResult { valid: boolean; format?: string; error?: string; entries?: number; totalSize?: number; } export interface EntryValidationResult { valid: boolean; entryName: string; error?: string; extractedPath?: string; } /** * Detect archive format by reading magic numbers */ export declare function detectArchiveFormat(filePath: string): ArchiveValidationResult; /** * Validate an archive entry path for zip-slip vulnerability * Returns the safe extraction path if valid, or error if invalid */ export declare function validateEntryPath(entryName: string, targetDirectory: string): EntryValidationResult; /** * Validate all entries in an archive before extraction * Returns list of invalid entries with reasons */ export declare function validateArchiveEntries(entries: Array<{ name: string; size?: number; }>, targetDirectory: string): { valid: boolean; invalidEntries: EntryValidationResult[]; }; /** * Sanitize entry name to remove potentially dangerous characters */ export declare function sanitizeEntryName(entryName: string): string; //# sourceMappingURL=archive-validator.d.ts.map