Repository navigation
Prepare 4.14.0: four request fixes and docs that match the code - #26
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found by an audit of the 4.x branch against the docs before DiceBear 11.0.0.
Fixes
/11.x/thumbs/svg/?seed=Felixmatched 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.𠮷were looked up by their high surrogate, so they found no font and the initials rendered as boxes in PNG, JPEG, WebP and AVIF.codePointAtinstead ofcharCodeAt.seedparameters still join with a comma, as before.Every fix has a test.
npm test: 221 passing.Docs
/11.xexample,borderRadiusinstead ofradius(which was silently dropped), and worker processes instead of threads, because the server usesnode:cluster.npm run buildfirst.data-dicebear-componentmarkup change in rc.4, and a compare link that went through a strayv1.14.0-rc.1tag.Not changed on purpose:
%2C-encoded commas in lists still return a 400 on a self-hosted instance.