Jump to content

$_server[php_self]


batstanggt

Recommended Posts

better off having the action field empty ''  instead of using $_SERVER['PHP_SELF'];

 

why not to use PHP_SELF

 

The PHP_SELF element can in fact be altered by the user to include any kind of malicious XSS code he/she desires

 

What an exagerated statement...

 

You can simply filter the element.

Link to comment
https://forums.phpfreaks.com/topic/244189-_serverphp_self/#findComment-1254093
Share on other sites

better off having the action field empty ''  instead of using $_SERVER['PHP_SELF'];

 

why not to use PHP_SELF

 

The PHP_SELF element can in fact be altered by the user to include any kind of malicious XSS code he/she desires

 

What an exagerated statement...

 

You can simply filter the element.

 

That's not exaggerated at all. It can be altered to include any malicious XSS code. Whether or not you sanitize it is a irrelevant, the statement says nothing about that. The whole point of it anyway is that people don't sanitize it and use it on form actions. Just leave it blank.

Link to comment
https://forums.phpfreaks.com/topic/244189-_serverphp_self/#findComment-1254116
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.