Loading ...

after update to 2.1 > comments '<'.removeEvilAttributes('b

Board index / PHP Melody - Video CMS

For PHP Melody version 2 and newer

Postby EGYPT on Dec 14, 2013 8 am


hello phpM Team
i noticed that after updating my website from v2.0.1 to v2.1
my comments system allow to anyone and i use blacklist function ,
every comment from visitors .. after submit comment , write automatically [b]'<'.removeEvilAttributes('br /').'>'[/b]
screen shot
[img]http://img855.imageshack.us/img855/703/scog.jpg[/img]
thanks in advance
EGYPT
Verified Customer
Verified Customer
 
Posts: 137
Joined: Jun 14, 2008 4 pm
Reputation points: 0

Postby ciberlinker on Feb 18, 2014 9 am


I have the same problem..
User avatar
ciberlinker
Verified Customer
Verified Customer
 
Posts: 744
Joined: Mar 22, 2008 4 pm
Reputation points: 33

Postby muzikia on Feb 18, 2014 12 pm


Change the comment system to the disqus. no more spam or other issues I've seen here and unsolved.
Here it is a tutorial: http://www.modmyscript.com/add-disqus-o ... elody-2-x/
[warning][url]http://www.ModMyScript.com[/url] - [color=#BF0000]PHPMelody plugins and mods since 2008[/color]
[url]http://www.HostingWays.com[/url] - [b][color=#BF0000]Shared or VPS Hosting[/color][/b]
*** PHP Melody user and plugins maker for 9 years and counting.[/warning]
User avatar
muzikia
Verified Customer
Verified Customer
 
Posts: 4120
Joined: Mar 24, 2008 6 am
Location: ModMyScript.com - PHPMELODY mods
Reputation points: 167

Postby ciberlinker on Mar 14, 2014 12 pm


[quote="muzikia"]Change the comment system to the disqus. no more spam or other issues I've seen here and unsolved.
Here it is a tutorial: http://www.modmyscript.com/add-disqus-o ... elody-2-x/[/quote]
Muzikia the problem is not only in the comments ..
[url=http://imageshack.com/i/0k5oy2g][img]http://imageshack.com/a/img20/534/5oy2.gif[/img][/url]
a greeting
User avatar
ciberlinker
Verified Customer
Verified Customer
 
Posts: 744
Joined: Mar 22, 2008 4 pm
Reputation points: 33

Postby muzikia on Mar 14, 2014 7 pm


[warning][url]http://www.ModMyScript.com[/url] - [color=#BF0000]PHPMelody plugins and mods since 2008[/color]
[url]http://www.HostingWays.com[/url] - [b][color=#BF0000]Shared or VPS Hosting[/color][/b]
*** PHP Melody user and plugins maker for 9 years and counting.[/warning]
User avatar
muzikia
Verified Customer
Verified Customer
 
Posts: 4120
Joined: Mar 24, 2008 6 am
Location: ModMyScript.com - PHPMELODY mods
Reputation points: 167

Postby Trace on Mar 14, 2014 8 pm


Solution
In /include/functions.php FIND[code]function removeEvilTags($source)
{
global $allowedTags;
$source = RemoveCurseWords(strip_tags($source, $allowedTags));
return preg_replace('/<(.*?)>/ie', "'<'.removeEvilAttributes('\\1').'>'", $source);
}[/code]
REPLACE WITH[code]function removeEvilTags($source)
{
global $allowedTags;
$source = RemoveCurseWords(strip_tags($source, $allowedTags));
return preg_replace_callback('/<(.*?)>/i', 'removeTagAttributes', $source);
}
function removeTagAttributes($in){
return '<'.removeEvilAttributes($in).'>';
}[/code]

Note: this will only fix new comments, the ones that are broken will remain broken
PHP Melody Plugins developer
[url=http://melodymods.com][color=#FF0000]PHP Melody plugins + themes for 1.6 and 1.7-2.7[/color][/url] | [url=http://melodymods.com/support/lists/]Subscribe to news of my work[/url] | Follow me on [url=https://www.facebook.com/Melodymods]Facebook[/url]
User avatar
Trace
Verified Customer
Verified Customer
 
Posts: 2543
Joined: Aug 16, 2010 3 pm
Location: The Netherlands
Reputation points: 1329

Postby ciberlinker on Mar 15, 2014 12 pm


Thanks Trace ;)
User avatar
ciberlinker
Verified Customer
Verified Customer
 
Posts: 744
Joined: Mar 22, 2008 4 pm
Reputation points: 33

Postby adysnake on Mar 16, 2014 7 am


Thanks Trace !!
adysnake
Verified Customer
Verified Customer
 
Posts: 56
Joined: Mar 29, 2009 4 pm
Location: Romania
Reputation points: 20

Postby mephisto on Nov 23, 2018 5 pm


Thanks Trace, been upgrading my old phpmelody 1.6.x to php 7.2 and this was one of the remaining issues.
mephisto
Verified Customer
Verified Customer
 
Posts: 2888
Joined: Sep 30, 2008 8 am
Reputation points: -6


Who is online

Users browsing this forum: No registered users and 0 guests

cron