fix for mossef.php adding livesite url to mailto: and javascript: links

Locked
zuberio
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Fri Jun 16, 2006 3:27 pm

fix for mossef.php adding livesite url to mailto: and javascript: links

Post by zuberio » Fri Jun 16, 2006 3:42 pm

Description:
mossef.php in Joomla! 1.0.8 turns
href="mailto:[email protected]" into href="forum.joomla.org/mailto:[email protected]"
and
href="javascript:foobaa()" into href="forum.joomla.org/javascript:foobaa()"

Reported on:
Joomla! 1.0.8

Classification:
[Q&T] Critical/High/Medium/Low/Enhancement

Affected functions:
Seems like this affects a lot of different components - I found it messed up AKOCommentsTweaked

Related files:
mossef.php

Steps to replicate:
install AKOCommentsTweaked on a Joomla! 1.0.8 and try using the smilies to make a post

Analysis:
[Q&T] Confirmed/Unable to confirm/Rejected
Any other comments

Proposed fix(es):

BROKEN / OLD:

// disable bot from being applied to mailto tags
if (strpos($matches[1],'mailto:')) {
return 'href="'. $matches[1] .'"';
}

FIXED / NEW:

// disable bot from being applied to mailto tags
if (strpos($matches[1],'mailto:') !== 0) {
return 'href="'. $matches[1] .'"';
}

// disable bot from being applied to javascript tags
if (strpos($matches[1],'javascript:') !== 0) {
return 'href="'. $matches[1] .'"';
}


Topic / Artifact ID:
[USER] Enter the crosss reference for topic or artifact id/url when submitted

System info:
Joomla! 1.0.8

User avatar
stingrey
Joomla! Hero
Joomla! Hero
Posts: 2756
Joined: Mon Aug 15, 2005 4:36 pm
Location: Marikina, Metro Manila, Philippines
Contact:

Re: fix for mossef.php adding livesite url to mailto: and javascript: links

Post by stingrey » Fri Jun 16, 2006 3:50 pm

This issue was resolved in 1.0.9
Rey Gigataras
http://www.wizmediateam.com <-- great team of talented Web Designers and Programmers!
http://about.me/reygigataras <-- About Me :)
Partner, Business Development & Project Manager, Event Manager, Sports Coach :D


Locked

Return to “Superseded Issues - Archive”