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)
Change History (7)
comment:1 by , 15 years ago
Keywords: | needinfo added |
---|
by , 15 years ago
Attachment: | Extlinks-with-whitelist.diff added |
---|
Patch to extend the extlinks filter with a domain whitelist
comment:3 by , 15 years ago
Keywords: | needinfo removed |
---|
comment:4 by , 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 , 15 years ago
Milestone: | not applicable → spam-filter-plugin |
---|
Patch needed (see TracDev/SubmittingPatches).