Skip to content

Commit

Permalink
Merge pull request #25 from zkemail/audit/first-header-char-validation
Browse files Browse the repository at this point in the history
veridise audit fix: First header value chars not validated
  • Loading branch information
jp4g authored Jan 13, 2025
2 parents 7a3a841 + d02648d commit 04b39f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/headers/mod.nr
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pub fn constrain_header_field<let MAX_HEADER_LENGTH: u32, let MAX_HEADER_FIELD_L
);
// check the header field is uninterrupted
let start_index = header_field_sequence.index + HEADER_FIELD_NAME_LENGTH + 1;
for i in (HEADER_FIELD_NAME_LENGTH + 1)..MAX_HEADER_FIELD_LENGTH {
for i in 0..MAX_HEADER_FIELD_LENGTH {
// is it safe enough to cut this constraint cost in half by not checking lf? i think so
let index = start_index + i;
if (index < header_field_sequence.index + header_field_sequence.length) {
Expand Down

0 comments on commit 04b39f3

Please sign in to comment.