client9 / libinjection

SQL / SQLI tokenizer parser analyzer
Other
1k stars 274 forks source link

TYPE_COLLATE #136

Open SimonSayID opened 6 years ago

SimonSayID commented 6 years ago

the source code seems don't have the corresponding case for assignment, only the TYPE_SQLTYPE have. code:

else if (sf->tokenvec[left].type == TYPE_COLLATE &&
                   sf->tokenvec[left+1].type == TYPE_BAREWORD) {
                         if (strchr(sf->tokenvec[left+1].val, '_') != NULL) {
                             sf->tokenvec[left+1].type = TYPE_SQLTYPE;
                             left = 0;
                        }
...
}

doesn't have something like

sf->tokenvec[left].type = TYPE_COLLATE 
client9 commented 6 years ago

Hello! thanks for writing it. I'd would love a test case before commenting further (and of course a Pull Request!).