lib/parser/elements.rb in arachni-0.2.4 vs lib/parser/elements.rb in arachni-0.3

- old
+ new

@@ -46,10 +46,12 @@ # attr_accessor :action attr_accessor :auditable + attr_accessor :orig + # # Relatively 'raw' hash holding the element's attributes, values, etc. # # @return [Hash] # @@ -111,10 +113,12 @@ @action = @raw['href'] @method = 'get' @auditable = @raw['vars'] + @orig = @auditable.deep_clone + @orig.freeze end def http_request( url, opts ) return @auditor.http.get( url, opts ) end @@ -153,10 +157,12 @@ @action = @raw['attrs']['action'] @method = @raw['attrs']['method'] @auditable = simple['auditable'] || {} + @orig = @auditable.deep_clone + @orig.freeze end def http_request( url, opts ) @@ -246,10 +252,13 @@ @simple = @auditable.dup @auditable.reject! { |cookie| Options.instance.exclude_cookies.include?( cookie ) } + + @orig = @auditable.deep_clone + @orig.freeze end def http_request( url, opts ) return @auditor.http.cookie( url, opts ) end @@ -272,9 +281,11 @@ @action = @url @method = 'header' @auditable = @raw + @orig = @auditable.deep_clone + @orig.freeze end def http_request( url, opts ) return @auditor.http.header( url, opts ) end