Commit 5c6ce1d5 authored by Tetiana Chupryna's avatar Tetiana Chupryna Committed by Nick Thomas

Improve logical order

parent e98fc829
---
title: Change order in dast location fingerprint
merge_request: 10487
author:
type: changed
......@@ -46,7 +46,7 @@ module Gitlab
end
def generate_location_fingerprint(location)
Digest::SHA1.hexdigest("#{location['path']}:#{location['param']}:#{location['method']}")
Digest::SHA1.hexdigest("#{location['path']}:#{location['method']}:#{location['param']}")
end
end
end
......
......@@ -24,8 +24,8 @@ describe Gitlab::Ci::Parsers::Security::Dast do
end
it 'generates expected location fingerprint' do
expected1 = Digest::SHA1.hexdigest(':X-Content-Type-Options:GET')
expected2 = Digest::SHA1.hexdigest('/:X-Content-Type-Options:GET')
expected1 = Digest::SHA1.hexdigest(':GET:X-Content-Type-Options')
expected2 = Digest::SHA1.hexdigest('/:GET:X-Content-Type-Options')
expect(report.occurrences.first[:location_fingerprint]).to eq(expected1)
expect(report.occurrences.last[:location_fingerprint]).to eq(expected2)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment