Skip to content

Commit b7c35ab

Browse files
committed
Remove non-standard colon from auth header separator
Signed-off-by: Lilly Rose Berner <[email protected]>
1 parent 8bb9284 commit b7c35ab

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

echo/openapi.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
"schema": {
111111
"type": "string",
112112
"format": "password",
113-
"description": "A password to access a secret Paste. Must have `password:` prefix."
113+
"description": "A password to access a secret Paste. Must have `Password` prefix."
114114
},
115115
"required": false,
116116
"in": "header",

echo/src/utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ impl<'r> FromRequest<'r> for PasswordHeader<'r> {
3434
None => return Outcome::Error((Status::Unauthorized, "Missing Authorization header.")),
3535
};
3636

37-
static PATTERN: Lazy<Regex> = Lazy::new(|| Regex::new(r"(?i:password): .+").unwrap());
37+
static PATTERN: Lazy<Regex> = Lazy::new(|| Regex::new(r"(?i:password) .+").unwrap());
3838

3939
if !PATTERN.is_match(value) {
4040
return Outcome::Error((Status::Unauthorized, "Invalid Authorization header."));

0 commit comments

Comments
 (0)