Edgewall Software
Modify

Opened 15 years ago

Closed 14 years ago

#8406 closed enhancement (fixed)

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: Branch:
Release Notes:
API Changes:
Internal 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 (1)

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

Download all attachments as: .zip

Change History (7)

comment:1 by Christian Boos, 15 years ago

Keywords: needinfo added

Patch needed (see TracDev/SubmittingPatches).

by Sven, 15 years ago

Patch to extend the extlinks filter with a domain whitelist

comment:2 by Sven, 15 years ago

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

comment:3 by Sven, 15 years ago

Keywords: needinfo removed

comment:4 by Christian Boos, 15 years ago

Keywords: review added
Milestone: 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 by Christian Boos, 15 years ago

Milestone: not applicablespam-filter-plugin

comment:6 by Dirk Stöcker, 14 years ago

Resolution: fixed
Status: newclosed

In r10021.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.