Fix Revision 601

With tests, this time.
This commit is contained in:
Jacques Distler 2010-02-28 23:51:33 -06:00
parent 70aa50ad4b
commit 7b22daa784
3 changed files with 13 additions and 4 deletions

View file

@ -45,7 +45,7 @@ module DNSBL_Check
addr = Resolv.getaddress("#{host}") rescue ''
if addr[0,7]=="127.0.0"
logger.info("#{request.remote_addr} found using DNSBL #{host}")
ban_help << " See <a href='#{DNSBLS[host]}#{request.remote_addr}'>here</a> for more information."
ban_help << "\n<p>See <a href='#{DNSBLS[dnsbl]}#{request.remote_addr}'>here</a> for more information.</p>"
passed = false
end
end
@ -58,8 +58,8 @@ module DNSBL_Check
$dnsbl_passed.push request.remote_addr
logger.warn("#{request.remote_addr} added to DNSBL passed cache")
else
render( :text => "Access denied. Your IP address, #{request.remote_addr}, was found on one or more DNSBL" +
" blocking list(s).#{ban_help}", :status => 403, :layout => 'error')
render( :text => "<p>Access denied. Your IP address, #{request.remote_addr}, was found on one or more DNSBL" +
" blocking list(s).</p>#{ban_help}", :status => 403, :layout => 'error', :locals => {:raw => true})
return false
end
end