From 180992d0f1b8d5731b0bf8844129f5686541bc86 Mon Sep 17 00:00:00 2001 From: Jonathan Davies Date: Tue, 6 Jun 2023 16:25:29 +0100 Subject: [PATCH 1/2] payload.rs: Fixed typo in error message. --- src/api/signature/payload.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/signature/payload.rs b/src/api/signature/payload.rs index c945ab11..1e3fa207 100644 --- a/src/api/signature/payload.rs +++ b/src/api/signature/payload.rs @@ -185,7 +185,7 @@ fn parse_query_authorization( if duration > 7 * 24 * 3600 { return Err(Error::bad_request( - "X-Amz-Exprires may not exceed a week".to_string(), + "X-Amz-Expires may not exceed a week".to_string(), )); } From 8a945ee9963021594378095c4b949bf15e816439 Mon Sep 17 00:00:00 2001 From: Jonathan Davies Date: Tue, 6 Jun 2023 16:26:06 +0100 Subject: [PATCH 2/2] payload.rs: Surround / in inverted commas. --- src/api/signature/payload.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/signature/payload.rs b/src/api/signature/payload.rs index 1e3fa207..b50fb3bb 100644 --- a/src/api/signature/payload.rs +++ b/src/api/signature/payload.rs @@ -211,7 +211,7 @@ fn parse_query_authorization( fn parse_credential(cred: &str) -> Result<(String, String), Error> { let first_slash = cred .find('/') - .ok_or_bad_request("Credentials does not contain / in authorization field")?; + .ok_or_bad_request("Credentials does not contain '/' in authorization field")?; let (key_id, scope) = cred.split_at(first_slash); Ok(( key_id.to_string(),