Jump to content

javascript hack


hvle

Recommended Posts

ajax can 'call' a php file on the server using the normal ajax connection, and that php file will execute.  Now that php file can do anything php has the power to do on your web host including create and read and write files on the server using 'fopen'.

 

It is possible for the user to go to a form on your web page, select a file from his computer using the 'browse' in connection with one of those form fields, and then that file is uploaded to the server using ajax.  Your server language, like php, can then install that file anywhere you want on your web site.

 

It is not possible, however, for javascript to access and upload a file on the users home machine to the server without the users direct interaction!  Nor are you allowed to download and install anything on the clients home machine without their direct interaction like clicking on a link that then pops up an alert box asking 'run file or save file?'.  If either of those things were allowed, the security dangers on the web would literally be thousands of times greater!

Link to comment
https://forums.phpfreaks.com/topic/68958-javascript-hack/#findComment-352493
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.