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

Escape single quotation mark and backslash when quoting string #29

Merged
merged 3 commits into from
Apr 10, 2023

Conversation

stevenskim
Copy link
Contributor

@stevenskim stevenskim commented Apr 10, 2023

Fixes: #24

Currently implementation improperly escapes the Quotation. It prevents SOQL injection by forcing it into invalid SOQL statement. However, we have use cases where first name of Lead may contain '. Example: O'Dell

Note: This does not handle escaping LIKE expression wildcards such as % and _. This is a cause for concern if there are any user provided fields that does a LIKE type of search. It's possible to add it to gsub to escape those characters to be on the safe side, but it has potential to break existing functionality.

JeffLuckett
JeffLuckett previously approved these changes Apr 10, 2023
Copy link
Contributor

@JeffLuckett JeffLuckett left a comment

Choose a reason for hiding this comment

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

Update PATCH version, add fix to CHANGELOG

@JeffLuckett JeffLuckett dismissed their stale review April 10, 2023 16:07

Nevermind ... noticed still draft.

@stevenskim stevenskim marked this pull request as ready for review April 10, 2023 16:07
Copy link
Contributor

@JeffLuckett JeffLuckett left a comment

Choose a reason for hiding this comment

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

Update PATCH version and add to CHANGELOG

@JeffLuckett JeffLuckett merged commit e971ea0 into main Apr 10, 2023
@JeffLuckett JeffLuckett deleted the 24-incorrectly-escaping-quotes-for-soql branch April 10, 2023 16:23
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.

[BUG] incorrectly escaping quotes for SOQL
2 participants