[wp-trac] [WordPress Trac] #57237: file_exists(): open_basedir restriction in effect. File(core/post-comments) is not within the allowed path(s)

WordPress Trac noreply at wordpress.org
Thu Dec 15 13:32:18 UTC 2022


#57237: file_exists(): open_basedir restriction in effect. File(core/post-comments)
is not within the allowed path(s)
--------------------------+------------------------------
 Reporter:  davidki       |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:
 Severity:  critical      |  Resolution:
 Keywords:  dev-feedback  |     Focuses:
--------------------------+------------------------------
Changes (by costdev):

 * keywords:   => dev-feedback


Comment:

 Hi @davidki, welcome to Trac!

 It seems that the `file_exists()` check [https://github.com/wordpress
 /wordpress-develop/blob/0dbdf5997a219e5c1dd44efb22e814e6f6eb0ba1/src/wp-
 includes/blocks.php#L532 here] does not take into consideration that a
 block name like `core/post-comments` will produce a check on the root of
 the filesystem, which, as we see here, causes warnings when the
 `open_basedir` PHP directive has been set.

 We're trying to avoid using the error suppression operator `@` as much as
 possible. However, this may be a suitable situation for it.

 @SergeyBiryukov Do you have any thoughts on this?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57237#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list