Paul Jakma wrote:
>> Exactly how does not using semi-colons in ones own code protect one
> from semi-colons injected in user input / reduce in any way need to
> fully validate input?
because MySQL does not allow multiple SQL commands in one single SQL
call, it is not possible (or at least, very difficult) to inject a
let's say, for example, we were to try and inject a line into Nils's code.
calling "shownews.php?id=1;delete * from news_posts" would delete
everything from the news_posts table, except that PHP thankfully removes
the semi-colon and everything after it, before it sends the query to the
of course, people need to validate their own code. In fact, I'm not sure
what the whole argument here is about. I just think that using a
semi-colon to signify the end of a statement, where it's very obvious
that the statement is finished, is redundant.
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!