mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-13 21:42:34 +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>,
|
||||
Form(PostAppTokenForm { name }): Form<PostAppTokenForm>,
|
||||
) -> Result<impl Responder, rustical_store::Error> {
|
||||
assert!(!name.is_empty());
|
||||
assert_eq!(path.into_inner(), user.id);
|
||||
let token = generate_app_token();
|
||||
auth_provider
|
||||
|
||||
Reference in New Issue
Block a user