Edgewall Software
Modify

Opened 9 years ago

Closed 9 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:
Release Notes:
API 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 Changed 9 years ago by Jonas Borgström

Owner: set to Jonas Borgström

comment:2 Changed 9 years ago by Jonas Borgström

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.
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.