fix: bound recording resources and add security regressions (#41)
Build and WordPress integration / Build and publish pristine package (push) Canceled after 0s
Build and WordPress integration / PHP 8.3 syntax and regression tests (push) Canceled after 0s
Build and WordPress integration / PHP 7.4 syntax and regression tests (push) Canceled after 0s
Build and WordPress integration / WordPress 6.3 / PHP 7.4 (push) Canceled after 0s
Build and WordPress integration / WordPress latest / PHP 8.2 (push) Canceled after 0s
Build and WordPress integration / Plugin Check (advisory) (push) Canceled after 0s

- Bound recording bytes, JSON structure, events, markers, terminal dimensions
  and timestamp arithmetic before unsafe player allocation or scheduling.
- Share validated playback data and metadata; cancel stale, failed and timed-out loads.
- Add PHP 7.4-compatible predecode budgets and preserve supported v1/v2/v3 behavior.
- Add localized errors, documented limits and 110 official/seeded recording fixtures.

Verified 325 Node tests, native PHP 7.4/8.3 regression suites and 55 Chromium tests
on each WordPress CI matrix. Preserve plugin version, vendor files and isolated
package artifacts.
This commit is contained in:
2026-10-15 11:42:07 +08:00
committed by GitHub
parent ffff9704e5
commit 6f8182db41
113 changed files with 7121 additions and 126 deletions
+18
View File
@@ -38,6 +38,24 @@ installs the release ZIP into the test site before checking it. Refer to the
workflow for setup details. Running a unit test is not a substitute for the
WordPress browser integration suite.
## Security recording regression fixtures
The full repository contains a test-only corpus in
[`tests/fixtures/security`](tests/fixtures/security/README.md). Small `.cast`
controls are checked in; fixed-seed, exact-boundary larger recordings are generated
only when a test requests them. The manifest records expected acceptance, byte
counts and hashes so PHP upload checks and the browser loader exercise identical
inputs. The corpus README explains official recorder provenance, format-specific
coverage, and the distinction between valid-format over-budget and malformed cases.
node tests/fixtures/security/generate.mjs --list
node tests/fixtures/security/generate.mjs --verify
Use these fixtures only in isolated local/CI test environments. Do not upload
resource-limit probes to a live WordPress site or open unvalidated large recordings
in a player. The normal test commands above run the regression assertions; the
browser cases use representative bounded samples rather than stressing the host.
## Translation maintenance
The English gettext strings are the fallback. Edit `languages/wp-asciiplayer-zh_CN.po`