lib/pwn/plugins/defect_dojo.rb in pwn-0.4.936 vs lib/pwn/plugins/defect_dojo.rb in pwn-0.4.937
- old
+ new
@@ -447,11 +447,11 @@
end
# Should only ever return 1 result so we should be good here
http_body[:lead] = user_by_username_object.first[:id]
end
- http_body[:tags] = opts[:tags].to_s.strip.chomp.scrub
+ http_body[:tags] = opts[:tags].to_s.strip.chomp.scrub.gsub("\s,\s", ',').split(',') if opts[:tags]
minimum_severity = opts[:minimum_severity].to_s.strip.chomp.scrub.downcase.capitalize
case minimum_severity
when '', 'Info', 'Low', 'Medium', 'High', 'Critical'
# Defaults to 'Info'
@@ -553,16 +553,14 @@
tests_by_engagement_object = test_list[:results].select do |test|
test[:engagement] == engagement_resource_uri
end
end
- tags = opts[:tags].to_s.strip.chomp.scrub
# TODO: wait for solution to:
# https://github.com/DefectDojo/django-DefectDojo/issues/457
# in order to obtain the unique test resource_uri
# by searching tags for unique identifier (would be better to have a unique test names)
-
- http_body[:tags] = tags
+ http_body[:tags] = opts[:tags].to_s.strip.chomp.scrub.gsub("\s,\s", ',').split(',') if opts[:tags]
http_body[:test] = opts[:test_resource_uri] if opts[:test_resource_uri]
minimum_severity = opts[:minimum_severity].to_s.strip.chomp.scrub.downcase.capitalize
case minimum_severity