Invalid argument supplied for foreach()
-
Hi,
The function get_images_url() In lightbox.php doesn’t check if $_POST[‘urls’] is empty or not.
Could you please add the following to the top of the function:
if ( empty( $_POST[‘urls’] ) ) { return; }
The DB query in this function also poses a possible security risk. People can get the post content of urls that they are unable to view via the frontend of the site, simply by posting that URL to your ajax action (which doesn’t do any nonce checks either). It would be best if you at least check for the post type, making sure only images are queried.
Thanks in advance!
Michael
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Invalid argument supplied for foreach()’ is closed to new replies.