Opened 15 years ago
Closed 12 years ago
#16410 closed defect (bug) (duplicate)
Open basedir problem in /wp-includes/theme.php
| Reported by: | webraket | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Themes | Version: | 3.0.4 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
Description
On line 590 in theme.php there's:
if ( is_dir($theme_root . '/' . $theme_dir) && is_readable($theme_root . '/' . $theme_dir) ) {
please change this to:
if ( $theme_dir!=".." && is_dir($theme_root . '/' . $theme_dir) && is_readable($theme_root . '/' . $theme_dir) ) {
is_dir() should not check .. and . folders, this results in open basedir errors when sharing themes between multiple installs. (symlinked)
Attachments (1)
Change History (6)
#2
follow-up:
↓ 4
@
15 years ago
- Cc added
- Keywords needs-patch added; has-patch removed
- Milestone Awaiting Review → Future Release
- Severity major → normal
#4
in reply to: ↑ 2
@
15 years ago
- Keywords has-patch added; needs-patch removed
Patch updated as per westi's and dd32's comments above. I realised we don't need to check for '..' specifically because we were already checking for $theme_dir[0] == '.', just needed to move it in front of the is_dir check.
Version 0, edited 15 years ago by
(next)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
We should more likely move the check for . and CVS before the if is_dir check and include .. (and probably .svn) in the list of dirs to skip