class Sqreen::Rules::UserAgentMatchesCB
Look for badly behaved clients
Public Instance Methods
pre(_inst, _args, _budget = nil, &_block)
click to toggle source
# File lib/sqreen/rules/user_agent_matches_cb.rb, line 12 def pre(_inst, _args, _budget = nil, &_block) ua = framework.client_user_agent return unless ua found = match_regexp(ua) return unless found Sqreen.log.debug { "Found UA #{ua} - found: #{found}" } infos = { :found => found } record_event(infos) advise_action(:raise, :data => found) end