New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correctly handle transport-padding after boundaries. #29
Conversation
@jebrosen , @SergioBenitez , any plan for new release? |
@rousan Yes, very soon. I also have a few updates to multer itself that break compatibility that I'd like to get in before the release. I'll update you within a week's time. |
@jebrosen Could you rebase on |
e947435
to
d7380c8
Compare
|
||
if state.stage == StreamingStage::DeterminingBoundaryType { | ||
let ext_len = constants::BOUNDARY_EXT.len(); | ||
let next_bytes = match stream_buffer.peek_exact(ext_len) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this check is necessary (including the new peek_exact
function) to verify that it is --boundary--
or --boundary[whitespace]CRLF
and not --boundaryZZ...
, but I would love to be proven wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor changes, but otherwise looks really good to me!
'transport-padding' is defined as any amount of linear whitespace (space or horizontal tab) between a boundary and its corresponding newline. See also https://tools.ietf.org/html/rfc2046#section-5.1.1 Fixes rwf2#25.
dad7c94
to
a40ac8b
Compare
Fixes #25.
I'm also installing
cargo-fuzz
so that I can try it out with these changes and (if wanted) add some transport-padding to the seeds.