Skip to content

Commit

Permalink
Properly strip html from signature preview - thanks Jorin for reporting
Browse files Browse the repository at this point in the history
Signed-off-by: emanuele <emanuele45@gmail.com>
  • Loading branch information
emanuele45 committed Aug 11, 2015
1 parent 5302e66 commit 372594b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sources/controllers/Xmlpreview.controller.php
Expand Up @@ -141,13 +141,14 @@ public function action_sig_preview()
$member['signature'] = parse_bbc($member['signature'], true, 'sig' . $user);

// And now what they want it to be
$preview_signature = !empty($_POST['signature']) ? $_POST['signature'] : '';
$preview_signature = !empty($_POST['signature']) ? Util::htmlspecialchars($_POST['signature']) : '';
$validation = profileValidateSignature($preview_signature);

// An odd check for errors to be sure
if ($validation !== true && $validation !== false)
$errors[] = array('value' => $txt['profile_error_' . $validation], 'attributes' => array('type' => 'error'));

preparsecode($preview_signature);
censorText($preview_signature);
$preview_signature = parse_bbc($preview_signature, true, 'sig' . $user);
}
Expand Down

0 comments on commit 372594b

Please sign in to comment.