Exploit database

GH-b4b7c965f06514199fc7ac8dd37a0f17

18f-copy/omniauth_login_dot_gov

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2015-9284

5 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files12

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

lib/omniauth/login_dot_gov/secure_compare.rb

Ruby · 503 bytes
module OmniAuth
  module LoginDotGov
    class SecureCompare
      # Borrowed from Devise.secure_compare
      # Ref: https://github.com/plataformatec/devise/blob/cb663e96a370ba5d3dc6aa8ea3a2683268e980a0/lib/devise.rb#L500-L507
      def self.compare(a, b)
        return false if a.nil? || b.nil? || a.empty? || b.empty? || a.bytesize != b.bytesize
        l = a.unpack "C#{a.bytesize}"

        res = 0
        b.each_byte { |byte| res |= byte ^ l.shift }
        res == 0
      end
    end
  end
end