No Code Attached Yet J3 Issue
avatar jsubri
jsubri
8 Jan 2017

Steps to reproduce the issue

  • Add an "Articles Category" module on the sample site
  • Under "Display Options" tab: everything on Hide, except "Introtext= show" and "Show Read More=show"
  • Create an article with the below html:
<p>Intro text <a href="mailto:sample@example.com">sample@example.com</a> - more more more</p>
<hr id="system-readmore" />
<p><br />Paragraph 1<br />1<br />2<br />3<br />4<br />5</p>
<p>Paragraph 2<br />1<br />2<br />3<br />4<br />5</p>
<p>Paragraph 3<br />1<br />2<br />3<br />4<br />5</p>
<p>End</p>

Expected result

Introtext shows the email address

Actual result

This email address is being protected from spambots. You need JavaScript enabled to...

capture

System information (as much as possible)

current staging and 3.6.5, older versions probably

Additional comments

n/a

avatar jsubri jsubri - open - 8 Jan 2017
avatar joomla-cms-bot joomla-cms-bot - change - 8 Jan 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 8 Jan 2017
avatar jsubri jsubri - edited - 8 Jan 2017
avatar dgt41
dgt41 - comment - 8 Jan 2017

@jsubri There a few things that make this functionality fail:

  • The module will strip out span and script tags
  • The length of the introtext is trimmed (removing vital javascript)

To make it work just replace https://github.com/joomla/joomla-cms/blob/staging/modules/mod_articles_category/helper.php#L325-L332 with:

	public static function _cleanIntrotext($introtext)
	{
		$introtext = str_replace(array('<p>','</p>'), ' ', $introtext);
		$introtext = strip_tags($introtext, '<a><em><strong><span><script>');
		$introtext = trim($introtext);

		return $introtext;
	}

And increase the allowed characters (in my test case 1000)

screen shot 2017-01-09 at 00 19 40

And the million dollar question: can this be patched without this hack?

  • well someone needs to spend sometime, I guess
avatar jsubri
jsubri - comment - 9 Jan 2017

Thank you for the workaround and yes $introtext is easily above 600 characters long.
Low priority anyway.

avatar PhilETaylor
PhilETaylor - comment - 11 Jan 2017

Does not this solution have security implications in so much as now the _cleanIntrotext method would allow script to be output?

avatar joomla-cms-bot joomla-cms-bot - change - 11 Jan 2017
The description was changed
avatar joomla-cms-bot joomla-cms-bot - edited - 11 Jan 2017
avatar dgt41
dgt41 - comment - 11 Jan 2017

@PhilETaylor I think I should redo #11027, will make patching this a lot easier (but I don't remember the reason we end up reverting it in the first place)

avatar nibra nibra - change - 24 Mar 2017
Category Plugins
avatar nibra nibra - change - 24 Mar 2017
Priority Medium Low
Status New Confirmed
avatar franz-wohlkoenig franz-wohlkoenig - change - 8 Nov 2017
Title
email cloacking problem within introtext
email cloaking problem within introtext
Status Confirmed Discussion
avatar joomla-cms-bot joomla-cms-bot - edited - 8 Nov 2017
avatar brianteeman brianteeman - change - 25 Mar 2018
Labels Added: J3 Issue
avatar brianteeman brianteeman - labeled - 25 Mar 2018
avatar jwaisner jwaisner - change - 12 Mar 2020
Status Discussion Information Required
avatar jwaisner
jwaisner - comment - 12 Mar 2020

@jsubri Is this issue still present in the latest J3?


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/13522.

avatar jsubri
jsubri - comment - 12 Mar 2020

I didn't checked recently, the workaround was good enough for me and I've advised my customer (NGO) to refrain adding email address in the introtext. Very high probability the javascript code is still present in the $introtext in current staging. I've not test with J4.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/13522.

avatar ReLater
ReLater - comment - 12 Mar 2020

Is this issue still present in the latest J3?

Yes.

avatar ReLater
ReLater - comment - 12 Mar 2020

Is this issue still present in latest Joomla 4 ?

Yes.

avatar brianteeman
brianteeman - comment - 13 Mar 2020

This is a bug that should be fixed in J3

avatar jwaisner jwaisner - change - 6 Apr 2020
Status Information Required Confirmed
avatar alikon
alikon - comment - 8 Jan 2022

please test #36602 for j4

avatar alikon alikon - change - 8 Jan 2022
Status Confirmed Closed
Closed_Date 0000-00-00 00:00:00 2022-01-08 08:27:18
Closed_By alikon
Labels Added: No Code Attached Yet
Removed: ?
avatar alikon alikon - close - 8 Jan 2022
avatar alikon alikon - change - 8 Jan 2022
Status Closed New
Closed_Date 2022-01-08 08:27:18
Closed_By alikon
avatar alikon alikon - reopen - 8 Jan 2022
avatar alikon
alikon - comment - 8 Jan 2022

still an issue on j3

avatar alikon alikon - change - 8 Jan 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-01-08 11:02:05
Closed_By alikon
avatar alikon
alikon - comment - 8 Jan 2022

the j3 pr #36603

avatar alikon alikon - close - 8 Jan 2022

Add a Comment

Login with GitHub to post a comment