forked from loafle/openapi-generator-original
Ruby: Fixed CodeQL polynomial regexp (#18699)
This commit is contained in:
committed by
GitHub
parent
e9f961e36e
commit
8924083d73
@@ -188,7 +188,7 @@ module OpenapiClient
|
||||
# @param [String] mime MIME
|
||||
# @return [Boolean] True if the MIME is application/json
|
||||
def json_mime?(mime)
|
||||
(mime == '*/*') || !(mime =~ /Application\/.*json(?!p)(;.*)?/i).nil?
|
||||
(mime == '*/*') || !(mime =~ /^Application\/.*json(?!p)(;.*)?/i).nil?
|
||||
end
|
||||
|
||||
# Deserialize the response to the given return type.
|
||||
@@ -267,7 +267,7 @@ module OpenapiClient
|
||||
# @param [String] filename the filename to be sanitized
|
||||
# @return [String] the sanitized filename
|
||||
def sanitize_filename(filename)
|
||||
filename.gsub(/.*[\/\\]/, '')
|
||||
filename.split(/[\/\\]/).last
|
||||
end
|
||||
|
||||
def build_request_url(path, opts = {})
|
||||
|
||||
Reference in New Issue
Block a user