WordPress.org

Make WordPress Core

Opened 6 months ago

Closed 6 months ago

Last modified 6 months ago

#42837 closed defect (bug) (fixed)

wp_normalize_path does not take into account stream wrappers

Reported by: calin Owned by: dd32
Milestone: 5.0 Priority: normal
Severity: normal Version: 3.9
Component: Filesystem API Keywords: has-patch needs-unit-tests
Focuses: Cc:

Description

wp_normalize_path does not take into account stream paths using php stream wrappers. I've attached a patch to fix this.

Attachments (2)

wp_normalize_path.diff (632 bytes) - added by calin 6 months ago.
wp_normalize_path_tests.diff (580 bytes) - added by calin 6 months ago.

Download all attachments as: .zip

Change History (7)

#1 @swissspidy
6 months ago

  • Component changed from General to Filesystem API
  • Keywords has-patch added
  • Version changed from trunk to 3.9

#2 @dd32
6 months ago

  • Keywords needs-unit-tests added

This would be a good candidate for some unit tests covering the current and new behaviour here.

#3 @calin
6 months ago

@dd32 I've attached a patch for tests.

#4 @dd32
6 months ago

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

In 42387:

Filesystem: Allow wp_normalise_path() to handle PHP stream wrappers such as php:// correctly.

Props calin, dd32.
Fixes #42837.

#5 @dd32
6 months ago

  • Milestone changed from Awaiting Review to 5.0
Note: See TracTickets for help on using tickets.