wpcf7_is_file_path_in_content_dir bug
-
Hi there,
we had issues with our hosting setup and your contact form 7 plugin. Forms were sending emails as expected but attachments were not attached. After a little debugging we found that the function wpcf7_is_file_path_in_content_dir in includes/validation-function.php was checking stringpos with realpath. But as the uploads directory is just a symlink to a mounted drive outside of the docroot, the realpath of uplaods had no match with WP_CONTENT_DIR or ABSPATH.UPLOADS.
The setup is something like this:
– /mount-point-for-uploads
– /some-system-path/docroot/wp-content/uploads -> /mount-point-for-uploadsIf you call realpath on the path /some-system-path/docroot/wp-content/uploads you will result in /mount-point-for-uploads which will result in a false return value from wpcf7_is_file_path_in_content_dir.
So why is it important that path is in content dir at the first place?
Thanks in advance
Edward
- The topic ‘wpcf7_is_file_path_in_content_dir bug’ is closed to new replies.