Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CAT-1068: generated openapi ruby library with basic e2e tests #48

Closed

Conversation

RiccardoPetteruti-Onfido
Copy link
Contributor

No description provided.

# @param [String] mime MIME
# @return [Boolean] True if the MIME is application/json
def json_mime?(mime)
(mime == '*/*') || !(mime =~ /Application\/.*json(?!p)(;.*)?/i).nil?

Check failure

Code scanning / CodeQL

Polynomial regular expression used on uncontrolled data High

This
regular expression
that depends on a
library input
may run slow on strings starting with 'application/' and with many repetitions of 'application/'.
This
regular expression
that depends on a
library input
may run slow on strings starting with 'application/' and with many repetitions of 'application/'.
This
regular expression
that depends on a
library input
may run slow on strings starting with 'application/' and with many repetitions of 'application/'.
# @param [String] filename the filename to be sanitized
# @return [String] the sanitized filename
def sanitize_filename(filename)
filename.gsub(/.*[\/\\]/, '')

Check failure

Code scanning / CodeQL

Polynomial regular expression used on uncontrolled data High

This
regular expression
that depends on a
library input
may run slow on strings with many repetitions of 'a'.
@dvacca-onfido dvacca-onfido deleted the feature/cat-1068-generated-ruby-lib branch July 18, 2024 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant