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

Fix keyword-nospace-number parsing #16

Closed
client9 opened this issue Apr 17, 2013 · 4 comments
Closed

Fix keyword-nospace-number parsing #16

client9 opened this issue Apr 17, 2013 · 4 comments

Comments

@client9
Copy link
Owner

client9 commented Apr 17, 2013

Microsoft's SQL parser does this

SELECT1; --> SELECT 1;
SELECT.1; --> SELECT .1;

so in a sqli like this:

'AND 1.-1LIKE.1 EXEC xp_cmdshell 'dir

libinjection gets confused by the LIKE.1 (thinks it's a single token of 'none' type).

@Kanatoko
Copy link

PostgreSQL 8.3.5 also takes "select.1 --> select .1"
(select1; becomes error)

@client9
Copy link
Owner Author

client9 commented Apr 18, 2013

sqlite3 quick test. I think no one actually accepts "SELECT1"

Will add to unit tests...

sqlite> select 1;
1
sqlite> select1;
Error: near "select1": syntax error
sqlite> select.1;
0.1
sqlite> select+1;
1
sqlite> select-1;
-1

@client9
Copy link
Owner Author

client9 commented Apr 19, 2013

unit tests added

@client9
Copy link
Owner Author

client9 commented Apr 21, 2013

fixed.

@client9 client9 closed this as completed Apr 21, 2013
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

2 participants