Implement limits to image size and load times (#1790)

* Implement limits to image size and load times
 - Prevents issues caused by users attempting to load large images
 - Implements #1729

* Check dimensions given before attempting to load image
This commit is contained in:
Jordan
2022-06-13 08:04:59 +01:00
committed by GitHub
parent 8377b0987c
commit 02a6bb9b27
4 changed files with 49 additions and 9 deletions

View File

@@ -17,6 +17,8 @@
"fawe.web.generating.link": "Uploading {0}, please wait...",
"fawe.web.generating.link.failed": "Failed to generate download link!",
"fawe.web.download.link": "{0}",
"fawe.web.image.load.timeout": "Image load attempt timed out, max time: {0}s. Please try a smaller-resolution image.",
"fawe.web.image.load.size.too-large": "Image dimensions too large! Max allowable size (width x height): {0} pixels.",
"fawe.worldedit.general.texture.disabled": "Texturing reset",
"fawe.worldedit.general.texture.set": "Set texturing to {1}",
"fawe.worldedit.general.source.mask.disabled": "Global source mask disabled",
@@ -104,6 +106,7 @@
"fawe.error.radius-too-small": "Radius must be >=0",
"fawe.error.time-too-less": "Time must be >=0",
"fawe.error.invalid-image": "Invalid image: {0}",
"fawe.error.image-dimensions": "Dimensions given for image too large, max allowable size (width x height): {0} pixels.",
"fawe.error.file-not-found": "File not found: {0}",
"fawe.error.file-is-invalid-directory": "File is a directory: {0}",
"fawe.error.stacktrace": "===============---=============",