Skip to content

Encryption must not rely on part file name #27142

@PVince81

Description

@PVince81

When overwriting existing files, the encryption code relies on the part file name to find out what the final file name is, this in order to get the existing encryption key set.

lib/private/Encryption/File.php|65| $ownerPath = $this->util->stripPartialFileExtension($ownerPath);
lib/private/Encryption/Keys/Storage.php|91| $realFile = $this->util->stripPartialFileExtension($path);
lib/private/Encryption/Util.php|250| public function stripPartialFileExtension($path) {
lib/private/Files/Storage/Wrapper/Encryption.php|386| $realFile = $this->util->stripPartialFileExtension($path);
lib/private/Files/Storage/Wrapper/Encryption.php|863| $realFile = $this->util->stripPartialFileExtension($path);
lib/private/Files/Storage/Wrapper/Encryption.php|911| $realFile = $this->util->stripPartialFileExtension($path);

This is bad because it prevents us to change the format of the part files to solve issues like too long file names: #26978

This blocks #26978

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions