In PHP, the allow_url_fopen
flag controls whether or not remote URLs can be used by various file system functions, in order to access remote files.
It is recommended security best practice nowadays to disable this option, as it is a potential attack vector. However, any code which depends on this functionality in order to work would be broken if the setting is disabled. For example, I know of at least one reCaptcha plugin which uses file_get_contents()
to access the Google API and which therefore depends on this flag.
In order to check the code in our applications to determine whether it is safe to disable this flag (with a view to rewriting, where necessary) I need a canonical list of the PHP functions that it affects. However, I have been unable to find such a list - there doesn't seem to be one on the PHP website and a Google search didn't turn anything up.
- Can anyone provide a list of all PHP functions whose behaviour is affected by
allow_url_fopen
?
The accepted answer should reference an authoritative source or provide details about methodology used to compile the list, to demonstrate its correctness and completeness.