Skip to content
Snippets Groups Projects
Commit 43d754eb authored by Eugen Rochko's avatar Eugen Rochko Committed by GitHub
Browse files

Fix not rejecting remote URIs when parsing out local IDs (#3012)

parent 2cc0d566
No related branches found
No related tags found
No related merge requests found
......@@ -48,6 +48,7 @@ class TagManager
end
def unique_tag_to_local_id(tag, expected_type)
return nil unless local_id?(tag)
matches = Regexp.new("objectId=([\\d]+):objectType=#{expected_type}").match(tag)
return matches[1] unless matches.nil?
end
......
......@@ -123,7 +123,9 @@ class ProcessInteractionService < BaseService
end
def status(xml)
Status.find(TagManager.instance.unique_tag_to_local_id(activity_id(xml), 'Status'))
uri = activity_id(xml)
return nil unless TagManager.instance.local_id?(uri)
Status.find(TagManager.instance.unique_tag_to_local_id(uri, 'Status'))
end
def activity_id(xml)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment