Upgrade to release 0.0.34:
Faster form parsing:
This release reduces parser overhead for forms with many fields and
corrects multipart boundary and header handling. Parsers created
without callbacks also no longer share callback registrations.
- Faster query-string parsing. The parser reuses separator
positions and starts the next field directly when its data is
already available.
- Less overhead for multipart forms. Complete CRLF sequences are
consumed without stepping through each intermediate parser state,
and mark-helper functions are no longer created on each write.
More predictable multipart handling:
- Padded boundaries no longer merge adjacent parts. Spaces
and tabs after delimiters between parts are recognized as
transport padding. Malformed padding now raises
MultipartParseError instead of being returned as part data.
Padded opening boundaries remain unsupported.
- Non-ASCII parameter bytes are preserved.
parse_options_header trims only spaces and tabs, rather than all
Unicode whitespace. This avoids changing parameter values such as
names ending in the UTF-8 bytes for a with a grave accent.
- Whitespace around part header values is ignored by FormParser
. For example, Content-Transfer-Encoding: base64 is
recognized and decoded despite the trailing space. Low-level
MultipartParser callbacks still receive the raw header value
bytes.
Isolated callbacks and clearer security scope:
- Callback registrations stay with their parser. Parsers
constructed without callbacks now get separate dictionaries, so
calling set_callback() on one no longer changes another parser's
handlers.
- A documented threat model. The threat model defines trust
boundaries, application responsibilities, and vulnerability
scope. Bugs in deprecated Content-Transfer-Encoding decoding are
handled as public bug reports rather than security reports.
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>