Skip to content

Commit

Permalink
Validate page state on leaving proofreading UI
Browse files Browse the repository at this point in the history
Prevent XSS injection into "Save as Done" and "Return Page to Round"
via the page state.
  • Loading branch information
cpeel committed Feb 12, 2023
1 parent acea39e commit 767a00c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/proofers/processtext.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
include_once($relPath.'metarefresh.inc');
include_once($relPath.'misc.inc'); // array_get()
include_once($relPath.'abort.inc');
include_once($relPath.'Project.inc'); // $PROJECT_STATES_IN_ORDER
include_once('PPage.inc');
include_once('proof_frame.inc');
include_once('text_frame_std.inc');
Expand All @@ -20,7 +21,7 @@
*/

$projectid = get_projectID_param($_POST, 'projectid');
$proj_state = $_POST['proj_state'];
$proj_state = get_enumerated_param($_POST, 'proj_state', null, $PROJECT_STATES_IN_ORDER);
$imagefile = get_page_image_param($_POST, 'imagefile');
$text_data = array_get($_POST, 'text_data', '');

Expand Down

0 comments on commit 767a00c

Please sign in to comment.