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

No char escaping while write http path to DB #29

Closed
sough opened this issue Apr 25, 2017 · 6 comments
Closed

No char escaping while write http path to DB #29

sough opened this issue Apr 25, 2017 · 6 comments
Assignees
Labels

Comments

@sough
Copy link

sough commented Apr 25, 2017

android.database.sqlite.SQLiteException: near "text": syntax error (code 1): , while compiling: INSERT INTO requests VALUES ( 5800091702000, 'http://ex.com/some'text.txt', '/storage/emulated/0/Download/id.txt', 900, '{}', 0, 0, -1, 600 )

@sough
Copy link
Author

sough commented Apr 25, 2017

Writing to db you need something like DatabaseUtils.sqlEscapeString(String). But then have to convert that string back to normal http string =(

but better to use selectionArgs

@tonyofrancis
Copy link
Owner

@sough Thanks for catching this. Will fix and ship in next release.

@sough
Copy link
Author

sough commented Apr 27, 2017

When you plan it?

@tonyofrancis
Copy link
Owner

some time next week.

@tonyofrancis
Copy link
Owner

This issue has been fixed and will make it in the next version of fetch. I will post another update in this thread.

@tonyofrancis
Copy link
Owner

Version 1.1.1 has been pushed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants