Wolfsblvt 1bb2a5ea19 Fix missing filename sanitization on V2 JSON character import + harden getPngName as safety nee (#5538)
* fix: sanitize character filenames on V2 JSON import and harden getPngName

- Add missing sanitize() call in importFromJson V2 spec branch to match all other import paths
- Sanitize data.name before readFromV2() so the name field sync happens automatically
- Add sanitize() as defense-in-depth inside getPngName() to catch future oversights
- Refactor getPngName() to use getUniqueName() utility for consistent name generation

* fix: sanitize data.name before readFromV2 in importFromPng and importFromCharX

Same bug as importFromJson: readFromV2() overwrites the top-level name
with the unsanitized data.name, undoing any prior sanitize() call.
Fix by sanitizing data.name before readFromV2 so the sync preserves it.

* fix: sanitize top-level name field in JSON and CharX import paths

* fix: incorrect path rejection in isPathUnderParent

* fix: increase maxTries in getPngName

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
2026-04-27 01:13:19 +03:00
2025-07-22 23:34:41 +03:00
2024-01-10 21:41:12 +02:00
2026-03-15 23:35:22 +02:00
2026-03-15 23:35:22 +02:00
2024-02-12 15:56:14 +02:00
2025-07-19 21:02:16 +03:00
2023-07-20 20:32:15 +03:00
2023-07-20 20:32:15 +03:00
2025-07-27 14:13:53 +03:00
2025-07-17 13:49:15 +00:00
2023-11-25 23:45:33 +02:00
2023-07-20 20:32:15 +03:00
2023-08-30 17:03:54 +03:00
2025-07-21 00:24:49 +03:00
S
Description
No description provided
Readme 117 MiB
Languages
JavaScript 88.5%
HTML 8.2%
CSS 2.8%
Less 0.3%