help with javascript

For everything that's not in any way related to PureBasic. General chat etc...
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8452
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Re: help with javascript

Post by netmaestro »

Thanks, I'll have a play with that. All of PHP is new to me so it's all good learning fodder, ugly or not. :mrgreen:
BERESHEIT
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: help with javascript

Post by srod »

netmaestro wrote:Thanks, I'll have a play with that. All of PHP is new to me so it's all good learning fodder, ugly or not. :mrgreen:
It shouldn't matter that you're not as good looking as I Netty, php is for all. :)

Mind you, I do look like a mule!
I may look like a mule, but I'm not a complete ass.
Nituvious
Addict
Addict
Posts: 1030
Joined: Sat Jul 11, 2009 4:57 am
Location: United States

Re: help with javascript

Post by Nituvious »

Image
:mrgreen:
▓▓▓▓▓▒▒▒▒▒░░░░░
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: help with javascript

Post by srod »

:lol:
I may look like a mule, but I'm not a complete ass.
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Re: help with javascript

Post by Mistrel »

Nituvious wrote:You can use ereg_replace to remove any possibility for directory transversal.
Actually, it's best practice to never use "include" with an instance where the path is obtained from user-editable input. For example: '$_GET["page"]'.

Even though you may think that you've parsed it safely, there may be ways around that.
Nituvious
Addict
Addict
Posts: 1030
Joined: Sat Jul 11, 2009 4:57 am
Location: United States

Re: help with javascript

Post by Nituvious »

Mistrel wrote:
Nituvious wrote:You can use ereg_replace to remove any possibility for directory transversal.
Actually, it's best practice to never use "include" with an instance where the path is obtained from user-editable input. For example: '$_GET["page"]'.

Even though you may think that you've parsed it safely, there may be ways around that.
True, I don't like using Include because of the possible exploits. I have allow_url_include turned off, so it "may" be a little safer for my tiny website. I used fopen before, but it became more troublesome but keep in mind I have only used php for about 6 months so, I'm still new to it!
▓▓▓▓▓▒▒▒▒▒░░░░░
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Re: help with javascript

Post by Mistrel »

It doesn't really matter if you turn off allow_url_include. The point is that they can "include" private areas of your website such as config files, .htaccess, etc. The most dangerous part is potentially including a PHP file in such a way that the actual page contents gets displayed. Hence, just "don't do it".
Post Reply