Author Topic: [FIX] - member.php update comment  (Read 4149 times)

0 Members and 1 Guest are viewing this topic.

Offline thunderstrike

  • 4images Guru
  • *******
  • Posts: 2.327
    • View Profile
[FIX] - member.php update comment
« on: September 08, 2007, 02:46:56 PM »
This for check variable. Check headline and text valid chars.

Find:

Quote
$comment_headline = un_htmlspecialchars(trim($HTTP_POST_VARS['comment_headline']));
$comment_text = un_htmlspecialchars(trim($HTTP_POST_VARS['comment_text']));

replace:

Code: [Select]
$comment_headline = (isset($HTTP_POST_VARS['comment_headline']) && preg_match("/[a-zA-Z0-9\.\,;:%&#@!\^-_~`\"'\[\]\{\}\*\/\?\(\)\n\r]/", $HTTP_POST_VARS['comment_headline'])) ? un_htmlspecialchars(trim((string)$HTTP_POST_VARS['comment_headline'])) : "";
$comment_text = (isset($HTTP_POST_VARS['comment_text']) && preg_match("/[a-zA-Z0-9\.\,;:%&#@!\^-_~`\"'\[\]\{\}\*\/\?\(\)\n\r]/", $HTTP_POST_VARS['comment_text'])) ? un_htmlspecialchars(trim((string)$HTTP_POST_VARS['comment_text'])) : "";
« Last Edit: August 27, 2011, 02:07:19 PM by thunderstrike »
8 steps need when ask question -

- PHP version (ACP - > phpinfo())
- mySQL version (ACP - > phpinfo())
- 4images version
- Post screenshot / URL
- Post code in BB Code (no need full file for code) or post attach file
- It doesn't work. What is say - what is do for no work
- Install MOD ? If so - please say (troubleshooting)
- Read FAQ ? Install Bug fixes ?