Make WordPress Core

Opened 10 days ago

Last modified 10 days ago

#52241 accepted defect (bug)

Infinite loop in clean_dirsize_cache()

Reported by: raubvogel Owned by: SergeyBiryukov
Milestone: 5.6.1 Priority: normal
Severity: major Version: 5.6
Component: Filesystem API Keywords: needs-patch needs-unit-tests
Focuses: multisite Cc:


Since WP 5.6 there exsists

function clean_dirsize_cache( $path ){}

at functions.php:7725.
There we have

        while ( DIRECTORY_SEPARATOR !== $path && '.' !== $path && '..' !== $path ) {
                $path = dirname( $path );
                unset( $directory_cache[ $path ] );

at functions.php:7735 which loops „forever“ if $path is something like c:\dir\subdir on Windows.

$path = dirname( $path );

returns the parent path in each step and gets „stuck“ at c:\.

Change History (2)

#1 in reply to: ↑ description @raubvogel
10 days ago

Btw. this breaks the media upload in my WordPress because media upload calls clean_dirsize_cache().

#2 @SergeyBiryukov
10 days ago

  • Component changed from General to Filesystem API
  • Focuses multisite added
  • Keywords needs-patch needs-unit-tests added
  • Milestone changed from Awaiting Review to 5.6.1
  • Owner set to SergeyBiryukov
  • Status changed from new to accepted
Note: See TracTickets for help on using tickets.