mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-31 20:32:20 +03:00
Adds three input modes for importing multiple Codex accounts at once,
all feeding a single partial-failure backend endpoint.
- `codexAuthZipExtract.ts`: safe ZIP extraction via fflate — rejects
path traversal (../ and absolute paths), per-file 256 KB cap, 10 MB
total cap, max 50 .json entries
- `POST /api/providers/codex-auth/zip-extract`: server-side ZIP
extraction returning [{name, json, parseError}] to the client
- `POST /api/providers/codex-auth/import-bulk`: iterates entries,
partial-failure semantics (always 200), per-entry audit log
`provider.credentials.imported` + summary `bulk_imported`
- `importCodexAuthBulkSchema`: max 50 entries, email validation
- `<ImportCodexAuthModal>`: Single/Bulk top tabs; Bulk has Upload
files, Paste list (JSON array or --- separator), ZIP sub-modes;
live entry preview list; overwrite checkbox; result panel
- Install `fflate@0.8.3` (pure TypeScript, zero native deps)
- 29 unit tests: 12 ZIP safety cases + 17 schema/parser/shape cases
6.1 KiB
6.1 KiB