Edgewall Software
Modify

Opened 16 years ago

Closed 16 years ago

#7627 closed defect (fixed)

IPBlacklistFilterStrategy not properly querying the DNS RBLs

Reported by: testnutzer123@… Owned by: Jonas Borgström
Priority: highest Milestone:
Component: plugin/spamfilter Version:
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

The spam filter IPBlacklistFilterStrategy queries doesn't finalize the dns names to query properly and therefore does only relative lookups.

It queries, for exmaple, for '3.2.1.10.bsb.empty.us' when it should be querying for '3.2.1.10.bsb.empty.us.'

Although this works most of the times it will not if the resolver has zones configured to query for relative lookup in case absolute lookups doesn't yield anything. And one of those zones suddenly starts resolving wildcard.

Suppose you got:

  • 3.2.1.10.bsb.empty.us
  • and a resolv.conf like
    domain example.org
    search example.org example.com
    
  • And example.com will start to resolve wildcard.

Internally queries will be:

  • 3.2.1.10.bsb.empty.us. NXDOMAIN
  • 3.2.1.10.bsb.empty.us.example.org. NXDOMAIN
  • 3.2.1.10.bsb.empty.us.example.com. A 127.0.0.1 ←- OOPS

Hence sandbox/spam-filter/tracspamfilter/filters/ip_blacklist.py@4111#L55 must be modified to:

  • either
    query(prefix + server.encode('utf-8') + '.')
    
  • or better
    from dns.name import from_text
    query(from_text(prefix + server.encode('utf-8')))
    

This bug is particularly bad as it might bite you in the arse all of a sudden when some infrastructure changes that you might not have under control.

Attachments (0)

Change History (2)

comment:1 by Jonas Borgström, 16 years ago

Owner: set to Jonas Borgström

comment:2 by Jonas Borgström, 16 years ago

Resolution: fixed
Status: newclosed

Fixed in [7539], thanks.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonas Borgström.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Jonas Borgström 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.