Issue Bug Resolved

#110687evaluatePermissions stays disabled when processing folder creation fails

Wolfgang Klinger 09/12/26, 05:39 updated 09/24/26, 22:05

Description

ResourceStorage::getProcessingFolder() switches permission checks off before it
creates the processing folder, and switches them back on after:

$currentEvaluatePermissions = $this->evaluatePermissions;
$this->evaluatePermissions = false;
$this->processingFolder = $this->createFolder(
    $processingFolder,
    $rootFolder
);
$this->evaluatePermissions = $currentEvaluatePermissions;

If createFolder() throws, the last line never runs. $this->evaluatePermissions
stays false for the rest of the request, so FAL permission checks are off on this
storage for everything that comes after.

This is reachable today. The \InvalidArgumentException catch right below returns an
InaccessibleFolder, but it does not restore the old value.

The other branch does the same with $storage->setEvaluatePermissions(false), and it
also does not restore it when createFolder() throws.

Suggested fix: restore the value in a finally block, so it does not depend on which
way the method leaves.

Related: #96727

Reviews 2

History 13

  1. Wouter Wolters commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-09-24T22:05:13+00:00" > 09/24/26, 22:05 </span>

    Applied in changeset commit:cfaebed60fb0d028cf4c53de53cbe5c4ac8d5b8c.