Prevent empty app tokens

This commit is contained in:
Lennart
2025-04-14 17:19:37 +02:00
parent 2ce8529002
commit 7b58df4153

View File

@@ -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