mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-23 02:27:40 +08:00
Merge #1768
1768: Fix auth error r=irevoire a=MarinPostma fix a small auth error, that set the invalid token error token to "hello". This was invilisble to the user because the invalid token is not returned. thank you hawk-eye `@irevoire` Co-authored-by: mpostma <postma.marin@protonmail.com>
This commit is contained in:
commit
2190764162
@ -168,7 +168,8 @@ impl<P: Policy + 'static, D: 'static + Clone> FromRequest for GuardedData<P, D>
|
||||
None => err(AuthenticationError::IrretrievableState.into()),
|
||||
}
|
||||
} else {
|
||||
err(AuthenticationError::InvalidToken(String::from("hello")).into())
|
||||
let token = token.to_str().unwrap_or("unknown").to_string();
|
||||
err(AuthenticationError::InvalidToken(token).into())
|
||||
}
|
||||
}
|
||||
None => err(AuthenticationError::MissingAuthorizationHeader.into()),
|
||||
|
Loading…
Reference in New Issue
Block a user