Browse Source

token mod-reportC-edit

Signed-off-by: Suki <[email protected]>
Suki 11 years ago
parent
commit
e95e196f5b
2 changed files with 4 additions and 0 deletions
  1. 3 0
      Sources/ReportedPosts.php
  2. 1 0
      Themes/default/ReportedPosts.template.php

+ 3 - 0
Sources/ReportedPosts.php

@@ -432,6 +432,9 @@ function EditComment()
 
 	if (isset($_REQUEST['save']) && isset($_POST['edit_comment']) && !empty($_POST['mod_comment']))
 	{
+		checkSession('get');
+		validateToken('mod-reportC-edit');
+
 		$edited_comment = trim($smcFunc['htmlspecialchars']($_POST['mod_comment']));
 
 		editModComment($context['comment_id'], $edited_comment);

+ 1 - 0
Themes/default/ReportedPosts.template.php

@@ -309,6 +309,7 @@ function template_edit_comment()
 			<br>';
 
 	echo '
+			<input type="hidden" name="', $context['mod-reportC-edit_token_var'], '" value="', $context['mod-reportC-edit_token'], '">
 			<input type="hidden" name="', $context['session_var'], '" value="', $context['session_id'], '">
 		</form>
 	</div>';