Skip to content

Commit d1bc63d

Browse files
committed
Fix forum XSS
1 parent 83a91ec commit d1bc63d

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

system/pages/forum/edit_post.php

+4
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@
3737
$smile = isset($_REQUEST['smile']) ? (int)$_REQUEST['smile'] : 0;
3838
$html = isset($_REQUEST['html']) ? (int)$_REQUEST['html'] : 0;
3939

40+
if (!superAdmin()) {
41+
$html = 0;
42+
}
43+
4044
$length = strlen($post_topic);
4145
if(($length < 1 || $length > 60) && $thread['id'] == $thread['first_post'])
4246
$errors[] = "Too short or too long topic (Length: $length letters). Minimum 1 letter, maximum 60 letters.";

system/pages/forum/new_thread.php

+5
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626
$post_topic = isset($_REQUEST['topic']) ? stripslashes($_REQUEST['topic']) : '';
2727
$smile = (isset($_REQUEST['smile']) ? (int)$_REQUEST['smile'] : 0);
2828
$html = (isset($_REQUEST['html']) ? (int)$_REQUEST['html'] : 0);
29+
30+
if (!superAdmin()) {
31+
$html = 0;
32+
}
33+
2934
$saved = false;
3035
if (isset($_REQUEST['save'])) {
3136
$length = strlen($post_topic);

0 commit comments

Comments
 (0)