fix(chromium): missing webp validation

This commit is contained in:
Julien Neuhart
2024-01-08 11:44:56 +01:00
parent afd3763d96
commit 0e8385a5a7
2 changed files with 36 additions and 2 deletions

View File

@@ -171,7 +171,7 @@ func FormDataChromiumScreenshotOptions(ctx *api.Context) (*api.FormData, Screens
return nil
}
if value != "png" && value != "jpeg" && value != "" {
if value != "png" && value != "jpeg" && value != "webp" {
return fmt.Errorf("wrong value, expected either 'png', 'jpeg' or 'webp'")
}