Class: HomographicSpoofing::Detector::Rule::Idn::UnsafeMiddleDot

Inherits:
Base
  • Object
show all
Defined in:
lib/homographic_spoofing/detector/rule/idn/unsafe_middle_dot.rb

Overview

  1. of Google Chrome IDN policy

Allow middle dot (U+00B7) only on Catalan domains when between two ‘l’s, to permit the Catalan character ela geminada to be expressed. See tools.ietf.org/html/rfc5892#appendix-A.3 for details.

Instance Method Summary collapse

Instance Method Details

#attack_detected?Boolean

Returns:

  • (Boolean)


7
8
9
10
11
# File 'lib/homographic_spoofing/detector/rule/idn/unsafe_middle_dot.rb', line 7

def attack_detected?
  label.scan(/l?·l?/).find do |match|
    tld != "cat" || match != "l·l"
  end
end