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

codeql vulnerability #1 fix #95

Merged
merged 2 commits into from
Sep 14, 2023
Merged

codeql vulnerability #1 fix #95

merged 2 commits into from
Sep 14, 2023

Conversation

tdutreui-solocal
Copy link
Collaborator

@tdutreui-solocal tdutreui-solocal commented Sep 14, 2023

@@ -7,6 +7,8 @@ def self.camelize(string)
end

def self.snakize(string)
raise "Unexpected string length : #{string.length} for string '#{string[0..200]}...'" if string.length > 1000
Copy link
Collaborator Author

@tdutreui-solocal tdutreui-solocal Sep 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we are expecting hash keys and classnames only

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
raise "Unexpected string length : #{string.length} for string '#{string[0..200]}...'" if string.length > 1000
raise "Unexpected string length : #{string.length} for string '#{string[0..200]}...'" if string.length > 200

I doubt we'll be dealing with strings longer than 200 characters anyway, will we?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK looks like we might have strings that can be quite long, so whatever you think.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error names for example could be long :
Example : CampaignServiceNegativeKeywordListWithActiveAssociationsCannotBeDeleted

@tdutreui-solocal tdutreui-solocal merged commit ffa1ca2 into master Sep 14, 2023
2 checks passed
@tdutreui-solocal tdutreui-solocal deleted the codeql-fix branch September 14, 2023 12:46
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.

2 participants