fix: reject zero-dimension viewport values
This commit is contained in:
@@ -41,7 +41,7 @@ switch ($url[0]) {
|
||||
exit;
|
||||
}
|
||||
$vpParts = array_map('intval', explode('x', $viewport));
|
||||
if ($vpParts[0] > 3840 || $vpParts[1] > 2160) {
|
||||
if ($vpParts[0] < 1 || $vpParts[1] < 1 || $vpParts[0] > 3840 || $vpParts[1] > 2160) {
|
||||
header('HTTP/1.0 400 Bad Request');
|
||||
echo 'Viewport exceeds maximum (3840x2160)';
|
||||
exit;
|
||||
|
||||
Reference in New Issue
Block a user