WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#10497 closed defect (bug) (fixed)

PHP safe-mode prevents WordPress from creating new directories

Reported by: remi Owned by:
Milestone: 3.0 Priority: normal
Severity: normal Version:
Component: Filesystem API Keywords: has-patch
Focuses: Cc:

Description

Running WordPress in safe-mode prevents the installation of plugins via the admin interface, because it is trying to create a new directory that ends with a "/", which is forbidden in safe-mode.

I created a patch that apply untrailingslashit to the path before creating it.

Attachments (1)

safemode-mkdir.diff (479 bytes) - added by remi 6 years ago.

Download all attachments as: .zip

Change History (7)

@remi6 years ago

comment:1 @remi6 years ago

  • Severity changed from major to normal

comment:2 follow-up: @Denis-de-Bernardy6 years ago

dup of #8830

comment:3 in reply to: ↑ 2 @remi6 years ago

Replying to Denis-de-Bernardy:

dup of #8830

I filed it as a new bug since it doesn't affect the same file. But yes, it's the same problem.

comment:4 @scribu6 years ago

  • Component changed from General to Filesystem
  • Keywords has-patch added
  • Milestone changed from Unassigned to 3.0

comment:5 @dd326 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [12741]) Fix WP_Filesystem_Direct::mkdir() when running under safe_mode on certain versions of PHP. Props remi. Fixes #10497

comment:6 @dd326 years ago

(In [12741]) Fix WP_Filesystem_Direct::mkdir() when running under safe_mode on certain versions of PHP. Props remi. Fixes #10497

Note: See TracTickets for help on using tickets.