fix: basic input validation for screen width and height (#7713)

This commit is contained in:
David Ediger
2017-11-14 08:42:06 -07:00
committed by Tony Murray
parent 00fc5bf0e8
commit 3c94ce7da0

View File

@@ -3,8 +3,10 @@
session_start();
if (isset($_REQUEST['width'], $_REQUEST['height'])) {
$_SESSION['screen_width'] = $_REQUEST['width'];
$_SESSION['screen_height'] = $_REQUEST['height'];
if (is_numeric($_REQUEST['height']) && is_numeric($_REQUEST['width'])) {
$_SESSION['screen_width'] = $_REQUEST['width'];
$_SESSION['screen_height'] = $_REQUEST['height'];
}
}
session_write_close();