Edgewall Software
Modify

Ticket #8406 (closed enhancement: fixed)

Opened 3 years ago

Last modified 18 months ago

ExternalLinksFilterStrategy should allow Whitelisting

Reported by: Sven Owned by:
Priority: normal Milestone: plugin - spam-filter
Component: plugin/spamfilter Version: none
Severity: normal Keywords: review
Cc:
Release Notes:
API Changes:

Description

I'd like to see the external links to allow for some kind of whitelisting.

Currently a link is considered external if its domain differs from the HOST HTTP header in the request.

I'd like to see a setting that allows the admin to define a more relaxed check which allows to include whole domains (*.example.com instead of only trac.example.com), because Links to other parts of that domain should not be considered external.

Attachments

Extlinks-with-whitelist.diff (1.5 KB) - added by Sven 3 years ago.
Patch to extend the extlinks filter with a domain whitelist

Download all attachments as: .zip

Change History

comment:1 Changed 3 years ago by cboos

  • Keywords needinfo added

Patch needed (see TracDev/SubmittingPatches).

Changed 3 years ago by Sven

Patch to extend the extlinks filter with a domain whitelist

comment:2 Changed 3 years ago by Sven

I added a patch to solve this issue. Please review.

comment:3 Changed 3 years ago by Sven

  • Keywords needinfo removed

comment:4 Changed 3 years ago by cboos

  • Keywords review added
  • Milestone set to not applicable

I'm not sure, but wouldn't this:

 	46	        allowed = self.allowed_domains 
 	47	        allowed.append(req.get_header('Host')) 
 	48	         

modify the default list in place? (accumulating the get_header('Host')).
Maybe a copy() is needed, would you care to check that?

Otherwise the patch looks good.

comment:5 Changed 2 years ago by cboos

  • Milestone changed from not applicable to spam-filter-plugin

comment:6 Changed 18 months ago by dstoecker

  • Resolution set to fixed
  • Status changed from new to closed

In r10021.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from (none). Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.