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

Double quotes inside SQL strings cause crashes #6

Open
AndreaSpinelli opened this issue May 20, 2014 · 0 comments
Open

Double quotes inside SQL strings cause crashes #6

AndreaSpinelli opened this issue May 20, 2014 · 0 comments

Comments

@AndreaSpinelli
Copy link

Hi, cute piece of software!

The following code crashes:

var sql = 'insert into foo (bar) values ('baz " biz') ; insert into foo (bar) values ('barbaz');
html5sql.process(sql, function() {});

Trying to debug, I found that at line 99 of html5sql.js the input string is split in two, and the splice on line 102 is executed repeatedly, until i+1 goes outside the array and the program crashes.

I guess that the split at line 95 must be substituted by something more complex.

Thanks in advance for your attention.

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