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

Bug - Miss sql escaping when using WHERE statement #41

Open
liorzam opened this issue Sep 18, 2017 · 0 comments
Open

Bug - Miss sql escaping when using WHERE statement #41

liorzam opened this issue Sep 18, 2017 · 0 comments

Comments

@liorzam
Copy link

liorzam commented Sep 18, 2017

Issue kind: BUG
Version: 1.1.3

While using where clause you should escape your query with

DatabaseUtils.sqlEscapeString(query)

or

query.replaceAll("'", "\'\'")

otherwise if LIKE operator of this query 'lior will raise

Caused by: java.lang.IllegalArgumentException: Unterminated quote in '( display_name LIKE '%'lior%' AND mimetype IN ('vnd.android.cursor.item/phone_v2', 'vnd.android.cursor.item/email_v2') )'

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

No branches or pull requests

1 participant