Skip to content

Commit 767a00c

Browse files
committed
Validate page state on leaving proofreading UI
Prevent XSS injection into "Save as Done" and "Return Page to Round" via the page state.
1 parent acea39e commit 767a00c

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tools/proofers/processtext.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
include_once($relPath.'metarefresh.inc');
66
include_once($relPath.'misc.inc'); // array_get()
77
include_once($relPath.'abort.inc');
8+
include_once($relPath.'Project.inc'); // $PROJECT_STATES_IN_ORDER
89
include_once('PPage.inc');
910
include_once('proof_frame.inc');
1011
include_once('text_frame_std.inc');
@@ -20,7 +21,7 @@
2021
*/
2122

2223
$projectid = get_projectID_param($_POST, 'projectid');
23-
$proj_state = $_POST['proj_state'];
24+
$proj_state = get_enumerated_param($_POST, 'proj_state', null, $PROJECT_STATES_IN_ORDER);
2425
$imagefile = get_page_image_param($_POST, 'imagefile');
2526
$text_data = array_get($_POST, 'text_data', '');
2627

0 commit comments

Comments
 (0)