Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix path of file_get_contents
Try to fix #28370  and #27441 

Avoid pre-pends the `$path` to the user's own storage.
  • Loading branch information
solracsf authored and backportbot[bot] committed Oct 4, 2021
commit 0506288882843ea1f09bf2d0e4cc12bc7cc29f21
2 changes: 1 addition & 1 deletion lib/private/legacy/OC_Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ public function loadFromFile($imagePath = false) {
default:

// this is mostly file created from encrypted file
$this->resource = imagecreatefromstring(\OC\Files\Filesystem::file_get_contents(\OC\Files\Filesystem::getLocalPath($imagePath)));
$this->resource = imagecreatefromstring(file_get_contents(\OC\Files\Filesystem::getLocalPath($imagePath)));
$iType = IMAGETYPE_PNG;
$this->logger->debug('OC_Image->loadFromFile, Default', ['app' => 'core']);
break;
Expand Down