Welcome to the "trac"-ing site of http-access2!
[soap4r] [httpclient] [openpgp4u] [pkcs1] [logger] [csv] [vtr]

Ticket #32 (closed defect: duplicate)

Opened 3 years ago

Last modified 2 years ago

Possible bug in WebAgent::CookieUtils#domain_match

Reported by: transfire@gmai;com Assigned to: nahi
Priority: normal Milestone: 2.0.7
Component: core Version: 2.0
Keywords: Cc:

Description

This piece of code I found in somone elses work (can't recall who's off the top of my head), but I thought I should share it just in case it really is a bug -- It indicates that the domain and host are in the wrong order for the tail_match? call.

# fixes http-access2 bug BEGIN {

require "http-access2" module WebAgent::CookieUtils?

def domain_match(host, domain)

case domain when /\d+\.\d+\.\d+\.\d+/

return (host == domain)

when '.'

return true

when /\./

# HERE!!! #return tail_match?(domain, host) return tail_match?(host, domain)

else

return (host == domain)

end

end

end

}

Change History