LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] php

[ILUG] php

kae verens kae at verens.com
Tue May 31 21:25:33 IST 2005


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
malicious line.

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
database.

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.

Kae



More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


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!
RSS Version
Powered by Dell