Skip to content

Commit

Permalink
fix: naive_redirect_server TCP Port should be a u16
Browse files Browse the repository at this point in the history
The Naive Redirect Server function accepts a u32 for what should be a 16-bit unsigned integer.

This change changes the function to accept a u16 to avoid out-of-bounds input.
  • Loading branch information
NTmatter committed Feb 20, 2024
1 parent fa15fac commit ff99801
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sdk/identity/src/development.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use tracing::debug;
/// This implementation should only be used for testing.
pub fn naive_redirect_server(
auth_obj: &AuthorizationCodeFlow,
port: u32,
port: u16,
) -> azure_core::Result<AuthorizationCode> {
let listener = TcpListener::bind(format!("127.0.0.1:{port}")).unwrap();

Expand Down

0 comments on commit ff99801

Please sign in to comment.