• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

decentraland / world-storage-service / 28628817499
99%

Build:
DEFAULT BRANCH: main
Ran 02 Jul 2026 11:49PM UTC
Jobs 1
Files 57
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

02 Jul 2026 11:48PM UTC coverage: 98.824% (-0.5%) from 99.351%
28628817499

push

github

web-flow
fix: harden storage quotas, input validation, and upstream resilience (#111)

* fix: harden storage quotas, input validation, and upstream resilience

Fixes from a full-codebase audit:

Quota correctness:
- Credit the existing value against the exact (place_id, key) row on
  upserts; a same-named key in another scene could previously be credited,
  letting worlds exceed their storage limit without bound.
- Aggregate quota totals and usage per place for shared Genesis City realms
  (per world for *.dcl.eth worlds, unchanged), so unrelated land scenes no
  longer compete for or disclose a single realm-wide pool. New place-aware
  covering indexes keep the per-write aggregation index-only.
- Run limits validation and the write atomically: upserts go through a new
  storage-operations logic component that holds pg_advisory_xact_lock on
  the quota scope inside a transaction, so concurrent upserts cannot
  validate against the same usage snapshot and both pass.
- Cast size sums to bigint (an int cast overflows at 2 GB and 500s every
  request in the scope).

Input validation and HTTP hardening:
- Validate :key length (1-255 chars) on all nine key endpoints instead of
  failing the varchar insert with a 500.
- Cap request bodies via Content-Length before anything buffers or parses
  them (411/413), and run authorization before schema validation so
  unauthorized callers cannot make the server parse bodies.
- Validate parcel metadata as two integers before it reaches upstream API
  paths; encode the LAMBDAS permission URL segments.
- Lowercase realm names so casing cannot split storage, cache namespaces,
  or quotas; a data migration lowercases existing rows (keeping the
  canonical lowercase row on collision) so mixed-case data stays reachable.
- Reject values containing NUL characters with a 400 (jsonb cannot store
  them); return stored empty-string env values instead of 404; validate the
  player address in clearPlayerStorageHandler; escape LIKE wildcard... (continued)

351 of 362 branches covered (96.96%)

Branch coverage included in aggregate %.

175 of 179 new or added lines in 30 files covered. (97.77%)

1078 of 1084 relevant lines covered (99.45%)

71.19 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
97.18
-2.82% src/adapters/env-storage/component.ts
1
98.45
-1.55% src/adapters/player-storage/component.ts
1
93.75
-6.25% src/controllers/handlers/player-storage/clear-player-storage.ts
1
77.78
0.0% src/logic/utils.ts
Jobs
ID Job ID Ran Files Coverage
1 28628817499.1 02 Jul 2026 11:49PM UTC 114
99.06
GitHub Action Run
Source Files on build 28628817499
  • Tree
  • List 57
  • Changed 35
  • Source Changed 27
  • Coverage Changed 35
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #28628817499
  • 638fe0f6 on github
  • Prev Build on main (#28469033931)
  • Next Build on main (#28960364948)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc