Skip to content

Commit

Permalink
Update scopes.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaMart committed May 24, 2024
1 parent 3db7f13 commit 891b7a1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libs/platforms/intigriti/scopes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ def self.parse_scopes(scopes)

categorized_scopes[type][category] ||= []
endpoint = case scope.dig('type', 'id')
when 1 || 7
normalize(scope['endpoint'])
when 1, 7
normalize(scope['endpoint'])
else
scope['endpoint']
scope['endpoint'].downcase
end
next unless endpoint

Expand All @@ -66,7 +66,7 @@ def self.normalize(endpoint)
endpoint = sanitize_endpoint(endpoint)

if endpoint.match?(%r{^(https?://|\*\.)[/\w.\-?#!%:=]+$}) || endpoint.match?(%r{^[/\w.-]+\.[a-z]+(/.*)?})
endpoint
endpoint.downcase
else
Utilities.log_warn("Intigriti - Non-normalized endpoint : #{endpoint}")
nil
Expand Down

0 comments on commit 891b7a1

Please sign in to comment.