Skip to content

Prepare 4.14.0: four request fixes and docs that match the code - #26

Merged
FlorianKoerner merged 4 commits into
4.xfrom
release/4.14.0-prep
Nov 25, 2026
Merged

FlorianKoerner merged 4 commits into
4.xfrom
release/4.14.0-prep

Conversation

@FlorianKoerner

Copy link
Copy Markdown
Member

Found by an audit of the 4.x branch against the docs before DiceBear 11.0.0.

Fixes

  • Trailing slash: /11.x/thumbs/svg/?seed=Felix matched the path route with an empty options segment and dropped the query string, so every seed got the same avatar with a 200. The options come from the query string now. With signing on, such a URL is checked like one without the slash.
  • Fonts outside the BMP: characters such as 𠮷 were looked up by their high surrogate, so they found no font and the initials rendered as boxes in PNG, JPEG, WebP and AVIF. codePointAt instead of charCodeAt.
  • CORS on 400s from the query parser: the hook that answers bracket notation and limit errors ran before the CORS hook, so a browser saw a CORS error instead of the message. CORS is registered first now.
  • Seeds with many commas: a seed with more than 146 commas hit the array limit. The seed is split off before qs parses the lists. Repeated seed parameters still join with a comma, as before.

Every fix has a test. npm test: 221 passing.

Docs

  • README: 63 styles, a /11.x example, borderRadius instead of radius (which was silently dropped), and worker processes instead of threads, because the server uses node:cluster.
  • CONTRIBUTING: how fonts and the blocklist are built, the actual layout and test files, and that tests need npm run build first.
  • CHANGELOG: a 4.14.0 summary under Unreleased, the fixes above, the core version in rc.2 (11.0.0-rc.2, not 11.1), the data-dicebear-component markup change in rc.4, and a compare link that went through a stray v1.14.0-rc.1 tag.

Not changed on purpose: %2C-encoded commas in lists still return a 400 on a self-hosted instance.

…nt, CORS on parser errors, seeds with many commas

- /11.x/thumbs/svg/?seed=Felix matched the path route with an empty options
  segment and dropped the query, so every seed got the same avatar.
- Characters outside the BMP were looked up by their high surrogate and got
  no font in raster output.
- The query parser hook ran before the CORS hook, so its 400s had no
  Access-Control-Allow-Origin header.
- A seed went through the comma split and hit the array limit.

Also bring README, CONTRIBUTING and the changelog in line with the code.
A path whose format segment is no format, such as /11.x/lorelei/gif or a
definition.json that is switched off, returned a 400 from the params schema.
It returns a 404 now. CORS preflights listed POST, which the API does not
serve.
@FlorianKoerner
FlorianKoerner merged commit 1c53c6f into 4.x Nov 25, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant