Skip to content

Prevent supplied resource is not a valid stream resource - #27261

Closed
liamdemafelix wants to merge 3 commits into
nextcloud:masterfrom
liamdemafelix:patch-1
Closed

Prevent supplied resource is not a valid stream resource#27261
liamdemafelix wants to merge 3 commits into
nextcloud:masterfrom
liamdemafelix:patch-1

Conversation

@liamdemafelix

@liamdemafelixliamdemafelix commented May 29, 2021

Copy link
Copy Markdown

The logs are spammed with fclose() not being able to close a non-resource:

image

This happens for every file. This pull request aims to check if a source is a valid resource before fclose()-ing, otherwise it silently returns true to avoid breaking compatibility.

This occurs when the primary storage backend is S3/S3-compatible. Probably also happens in non-standard backends (Openstack, etc.) but wasn't tested.

This has been tested to work on my setup:

  • Nextcloud 21.0.2
  • PHP 7.4
  • Deployed through the linuxserver/nextcloud Docker image
  • Primary Object Storage: S3 (Wasabi)

@skjnldsvskjnldsv added 3. to review Waiting for reviews bug labels May 29, 2021
@skjnldsvskjnldsv added this to the Nextcloud 22 milestone May 29, 2021
@blizzzblizzz mentioned this pull request Jun 2, 2021
57 tasks
Comment threadapps/files_external/3rdparty/icewind/streams/src/Wrapper.php Outdated
Co-authored-by: Andreas Skorczyk <me@andreas-sk.de>
@MorrisJobkeMorrisJobke mentioned this pull request Jun 10, 2021
59 tasks
This was referenced Jun 16, 2021
@blizzzblizzz modified the milestones: Nextcloud 22, Nextcloud 23Jun 24, 2021
@skjnldsvskjnldsv mentioned this pull request Oct 13, 2021
@skjnldsv

Copy link
Copy Markdown
Member

Fixed upstream already

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsbug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@liamdemafelix@skjnldsv@AndreasSko@blizzz