? ? ? Pending

User tests: Successful: Unsuccessful:

avatar bembelimen
bembelimen
21 Aug 2017

Summary of Changes

This PR adds the functionality to exclude specific urls in the redirect extension. For example I got a lot of wordpress hacking attemps on my Joomla! page (wp-admin) which are polluting my database. Now it's possible to exclude this things

Testing Instructions

  1. Apply this patch
  2. Activate the redirect plugin
  3. In the plugin you can either define a term or an regular expression (check the checkbox) for the string to seach
  4. Call a page which does not exists

Examples:
normal term: abc
regular expression: [x]{2}

Expected result

your-domain.tld/abc => will not be saved in the database
your-domain.tld/xx => will not be saved in the database

your-domain.tld/x => will be saved in the database
your-domain.tld/yy => will be saved in the database

avatar joomla-cms-bot joomla-cms-bot - change - 21 Aug 2017
Category Administration Language & Strings Front End Plugins
avatar bembelimen bembelimen - open - 21 Aug 2017
avatar bembelimen bembelimen - change - 21 Aug 2017
Status New Pending
avatar bembelimen bembelimen - change - 21 Aug 2017
Labels Added: ? ?
avatar brianteeman
brianteeman - comment - 21 Aug 2017

The language strings that are for tooltips (***_DESC) should end with a period.

As far as I remember the *.sys.ini language file is only for items that will be added to a menu. Regular language strings should be in *.ini

avatar bembelimen
bembelimen - comment - 21 Aug 2017

Thanks @brianteeman

avatar chmst chmst - test_item - 21 Aug 2017 - Tested successfully
avatar chmst
chmst - comment - 21 Aug 2017

I have tested this item successfully on 1aaf0cb

Tested successfully on 3.7.5. Very cool!


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

avatar brianteeman
brianteeman - comment - 21 Aug 2017

Will there not be a performance hit?

avatar bembelimen
bembelimen - comment - 21 Aug 2017

With thousands of thousands excludes there will be a performance hit, when there is a error thrown, yes

avatar brianteeman
brianteeman - comment - 21 Aug 2017

@bembelimen won't the same be true with a regex?

avatar bembelimen
bembelimen - comment - 21 Aug 2017

Yes, true for both

avatar bembelimen
bembelimen - comment - 21 Aug 2017

@brianteeman to make it clear: this checks will only be triggered, if Joomla! throws an error, not in the normal process.

avatar Didldu-Florian Didldu-Florian - test_item - 21 Aug 2017 - Tested successfully
avatar Didldu-Florian
Didldu-Florian - comment - 21 Aug 2017

I have tested this item successfully on a8497b2


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

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 22 Aug 2017

@chmst @Didldu-Florian can you please retest?

avatar DrDreave DrDreave - test_item - 22 Aug 2017 - Tested successfully
avatar DrDreave
DrDreave - comment - 22 Aug 2017

I have tested this item successfully on e72c031

Plugin works as described above.

Notes

I don't know if this is an intentional behaviour, but maybe the url preg_match should include the word boundary parameters, so it has to match the whole url. I was kind of confused '[x]{2}' also matches 'xxx' and 'xxasdasd'. Same applies for non-regex excludes.

Current

preg_match('/' . $exclude->term . '/i', $orgurlRel)

Suggestion

preg_match('/\b' . $exclude->term . '\b/i', $orgurlRel)

Tested @icampus


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

avatar Didldu-Florian Didldu-Florian - test_item - 22 Aug 2017 - Tested successfully
avatar Didldu-Florian
Didldu-Florian - comment - 22 Aug 2017

I have tested this item successfully on e72c031


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

avatar franz-wohlkoenig franz-wohlkoenig - change - 22 Aug 2017
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 22 Aug 2017

RTC after two successful tests.

Thanks Guys.

avatar mbabker mbabker - change - 23 Aug 2017
Labels Added: ?
avatar mbabker mbabker - change - 23 Aug 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-08-23 11:53:34
Closed_By mbabker
avatar mbabker mbabker - close - 23 Aug 2017
avatar mbabker mbabker - merge - 23 Aug 2017

Add a Comment

Login with GitHub to post a comment