[wp-trac] [WordPress Trac] #61834: class-wp-site-health-auto-updates.php triggers error when basedir restrictions in effect
WordPress Trac
noreply at wordpress.org
Wed Aug 21 22:22:11 UTC 2024
#61834: class-wp-site-health-auto-updates.php triggers error when basedir
restrictions in effect
-------------------------------------+-----------------------------
Reporter: Keffr3n | Owner: SergeyBiryukov
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 6.7
Component: Filesystem API | Version: 6.6.1
Severity: normal | Resolution: fixed
Keywords: has-patch needs-testing | Focuses:
-------------------------------------+-----------------------------
Changes (by SergeyBiryukov):
* owner: (none) => SergeyBiryukov
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"58921" 58921]:
{{{
#!CommitTicketReference repository="" revision="58921"
Site Health: Check if the directories are allowed when testing for a VCS
checkout.
As part of determining whether to perform automatic updates, WordPress
checks if it is running within a version-controlled environment,
recursively looking up the filesystem to the top of the drive, looking for
a Subversion, Git, Mercurial, or Bazaar directory, erring on the side of
detecting a VCS checkout somewhere.
This commit reuses `WP_Automatic_Updater::is_allowed_dir()` in the Site
Health test to avoid a PHP warning if the `open_basedir` directive is in
use and any of the directories checked in the process are not allowed:
{{{
is_dir(): open_basedir restriction in effect. File(/.git) is not within
the allowed path(s)
}}}
Follow-up to [44986], [55425].
Props Keffr3n, narenin.
Fixes #61834.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61834#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list