mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-14 03:32:15 +00:00
Prevent empty app tokens
This commit is contained in:
@@ -128,6 +128,7 @@ async fn route_post_app_token<AP: AuthenticationProvider>(
|
|||||||
path: Path<String>,
|
path: Path<String>,
|
||||||
Form(PostAppTokenForm { name }): Form<PostAppTokenForm>,
|
Form(PostAppTokenForm { name }): Form<PostAppTokenForm>,
|
||||||
) -> Result<impl Responder, rustical_store::Error> {
|
) -> Result<impl Responder, rustical_store::Error> {
|
||||||
|
assert!(!name.is_empty());
|
||||||
assert_eq!(path.into_inner(), user.id);
|
assert_eq!(path.into_inner(), user.id);
|
||||||
let token = generate_app_token();
|
let token = generate_app_token();
|
||||||
auth_provider
|
auth_provider
|
||||||
|
|||||||
Reference in New Issue
Block a user