@@ -367,3 +367,39 @@ Feature: previews of files downloaded through the webdav API
367367 | spaces | fill | fill .png |
368368 | spaces | resize | resize .png |
369369 | spaces | thumbnail | thumbnail .png |
370+
371+ @issue-10589 @env-config
372+ Scenario Outline : try to download an image preview when the maximum thumbnail input value in the environment is set to a small value
373+ Given the following configs have been set:
374+ | config | value |
375+ | THUMBNAILS_MAX_INPUT_IMAGE_FILE_SIZE | 1KB |
376+ | THUMBNAILS_MAX_INPUT_WIDTH | 200 |
377+ | THUMBNAILS_MAX_INPUT_HEIGHT | 200 |
378+ And using <dav-path-version> DAV path
379+ And user "Alice" has uploaded file "filesForUpload/testavatar.jpg" to "/testimage.jpg"
380+ When user "Alice" downloads the preview of "/testimage.jpg" with width "36" and height "36" and processor thumbnail using the WebDAV API
381+ Then the HTTP status code should be "403"
382+ And the value of the item "/d:error/s:message" in the response should be "thumbnails: image is too large"
383+ Examples :
384+ | dav -path -version |
385+ | old |
386+ | new |
387+ | spaces |
388+
389+ @issue-10589 @env-config
390+ Scenario Outline : try to download a file preview when the maximum thumbnail input value in the environment is set to a small value
391+ Given the following configs have been set:
392+ | config | value |
393+ | THUMBNAILS_MAX_INPUT_IMAGE_FILE_SIZE | 1KB |
394+ | THUMBNAILS_MAX_INPUT_WIDTH | 200 |
395+ | THUMBNAILS_MAX_INPUT_HEIGHT | 200 |
396+ And using <dav-path-version> DAV path
397+ And user "Alice" has uploaded file "filesForUpload/lorem-big.txt" to "/lorem-big.txt"
398+ When user "Alice" downloads the preview of "/lorem-big.txt" with width "36" and height "36" and processor thumbnail using the WebDAV API
399+ Then the HTTP status code should be "403"
400+ And the value of the item "/d:error/s:message" in the response should be "thumbnails: image is too large"
401+ Examples :
402+ | dav -path -version |
403+ | old |
404+ | new |
405+ | spaces |
0 commit comments