No Code Attached Yet bug
avatar formfranska
formfranska
4 Feb 2023

Steps to reproduce the issue

I'm note sure how to phrase this correctly but I was told to report it in this post: https://forum.joomla.org/viewtopic.php?p=3683408#p3683408

Expected result

Please view comments from people in the post.

Actual result

System information (as much as possible)

Additional comments

avatar formfranska formfranska - open - 4 Feb 2023
avatar formfranska formfranska - change - 4 Feb 2023
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 4 Feb 2023
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 4 Feb 2023
avatar LukasHH
LukasHH - comment - 4 Feb 2023

The problem is that the behavior came with the last PR. It should detect mail addresses set as placeholders, in title attributes or written freely in the text and protect against spam bots.
#39508

I can't think of an idea now how to distinguish this when the filename is in the form of an email address.

avatar LukasHH
LukasHH - comment - 4 Feb 2023

I have checked it again. It is the pattern that was not present in 4.2.6 and was included again due to Issue #39422.

I think the easiest thing to do would be to change the file name and, if possible, to generally avoid using special characters in file names.

avatar formfranska
formfranska - comment - 5 Feb 2023

@LukasHH
Thank you! Yes, for sure. I changed the filename immediately and it solved the issue for me. I normally check file names and never use weird characters in them but for some reason I had missed this one that was generated in ADOBE Illustrator asset export.

So only reason I posted about it here was because people in that thread in the Forum told me to. For me, the issue is solved. Please feel free to close this issue (that I suspect is not really an issue then ?).

avatar brianteeman
brianteeman - comment - 5 Feb 2023

is it not recommended practice to use @ in filenames when creating retina images?

this does sound like an undesirable breaking change in a patch release

@roland-d @fancyFranci

avatar richard67
richard67 - comment - 11 Feb 2023

The same issue has been reported again with #39832 , and as stated there in the initial post at the end, it seems to be common practice for some image and vector graphics editors to add an "@" to the file name. I'll close the other issue as duplicate, so let's continue discussion here.

avatar richard67 richard67 - change - 11 Feb 2023
Title
spam bot protector fires when @ in filename (image)
Email Cloaking fires when @ in filename (image)
avatar richard67 richard67 - edited - 11 Feb 2023
avatar richard67
richard67 - comment - 11 Feb 2023

I've allowed myself to change the title of this issue so it contains "Email Cloaking" which makes it easier to be found when people search for it, since "Email Cloaking" is the well known name of that feature.

avatar roland-d
roland-d - comment - 15 Feb 2023

Thank you for the tag @brianteeman

As Brian pointed out it does seem to be common practice to use @ in filenames for retina images.

@LukasHH Could you check if we can improve the regex so that retina images are not affected?

avatar LukasHH
LukasHH - comment - 15 Feb 2023

from the theory I have found something how to exclude something if src is included in the context.
'~<[^<]*(?<!\/(src))>(*SKIP)(*F)|([\w\.\'\-\+]+\@(?:[a-z0-9\.\-\p{L}]+\.)+(?:[a-zA-Z0-9\-\p{L}]{2,24}))~iu'
regex Example
But this must still be tested in Joomla, whether it has not other side effects. I will try to find a PR.

avatar roland-d
roland-d - comment - 16 Feb 2023

@LukasHH Thank you.

avatar LukasHH
LukasHH - comment - 20 Feb 2023

A first local test shows me that it doesn't seem to work after all.
My idea in this line:

$pattern = '~<[^<]*(?<!\/)>(*SKIP)(*F)|' . $searchEmail . '~i';

by adding "src" in the first part so that the pattern is not applied in this example.
$pattern = '~<[^<]*(?<!\/(src))>(*SKIP)(*F)|' . $searchEmail . '~i';

In the regex editor it works, but in Joomla it runs into a timeout for me.

avatar Hackwar Hackwar - change - 22 Feb 2023
Labels Added: bug
avatar Hackwar Hackwar - labeled - 22 Feb 2023
avatar LukasHH
LukasHH - comment - 23 Feb 2023

At the weekend I will probably create a PR.

avatar LukasHH
LukasHH - comment - 24 Feb 2023

@formfranska @crystalenka please test the PR #39932

avatar richard67 richard67 - change - 24 Feb 2023
Status New Closed
Closed_Date 0000-00-00 00:00:00 2023-02-24 19:44:17
Closed_By richard67
avatar richard67
richard67 - comment - 24 Feb 2023

Closing as having a pull request. Please test #39932 . Thanks in advance.

avatar richard67 richard67 - close - 24 Feb 2023
avatar formfranska
formfranska - comment - 25 Feb 2023

@formfranska @crystalenka please test the PR #39932

Sorry, Not sure exactly what I'm supposed to do. I wasn't able to copy the text from your test article https://github.com/LukasHH/other-test/blob/main/email_cloaking_test_source.html (couldn't scroll all the way down). Complete newbie in github. Sorry ?

Add a Comment

Login with GitHub to post a comment