Skip to content

Commit

Permalink
Parse URL safe base64 encoding in header values
Browse files Browse the repository at this point in the history
Errata from #23. Parsing still expected the standard base64 alphabet so
base64url values were rejected.
  • Loading branch information
cbranch committed Nov 13, 2023
1 parent f442abc commit cf1b752
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/auth/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub(crate) fn parse_u32(input: &str) -> Result<u32, std::num::ParseIntError> {
}

pub(crate) fn base64_char(input: &str) -> IResult<&str, &str> {
nom::bytes::complete::is_a("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=")(
nom::bytes::complete::is_a("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=")(
input,
)
}
Expand Down

0 comments on commit cf1b752

Please sign in to comment.