Skip to content

feat: support strict URL-encoded form transport - #128

Closed
HusenseMichael wants to merge 3 commits into
LuvDaSun:mainfrom
HusenseMichael:feat/urlencoded-form-transport
Closed

feat: support strict URL-encoded form transport#128
HusenseMichael wants to merge 3 commits into
LuvDaSun:mainfrom
HusenseMichael:feat/urlencoded-form-transport

Conversation

@HusenseMichael

Copy link
Copy Markdown

Summary

  • generate typed application/x-www-form-urlencoded client request bodies and server entities
  • enforce a 16 KiB / 32-field strict UTF-8 parser with duplicate-field and prototype-pollution defenses
  • fix generated Cookie authentication emission
  • bump @skiffa/lib to 0.14.6 and @skiffa/generator to 0.14.2

Verification

  • npm test (18/18)
  • npm run spelling (215 files, zero issues)
  • Prettier check for every changed supported file
  • generated client/server round-trip plus duplicate, oversized, malformed, and exact-media-type regressions

Release order

Publish @skiffa/lib 0.14.6 before @skiffa/generator 0.14.2.

@HusenseMichael

Copy link
Copy Markdown
Author

@LuvDaSun could you please review this strict URL-encoded transport change? It is required to safely deliver typed OIDC logout form bodies through generated clients and servers. All 18 local tests and the repository spelling gate pass.

@elmerbulthuis elmerbulthuis self-assigned this Jul 25, 2026

@elmerbulthuis elmerbulthuis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the purpose of this PR is to support form encoding (which is a very good thing to have), then is should support this in both request and response and it should not touch anything else.

If this (form encoding) is a desired feature, then please make a request for it via issues!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not introduce new repository structures if not needed, this should be tested differently. Following the structure in place.

throw new UrlEncodedFormError("URL-encoded form contains invalid percent encoding");
}
try {
return decodeURIComponent(value.replaceAll("+", " "));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this?

Comment thread test-package-npm
for F in $(ls fixtures/specifications/*.yaml); do
echo $(basename $F .yaml)

REQUEST_TYPES=""

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be handled differntly, form encoding should be one of the defaults

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants