Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent supplied resource is not a valid stream resource #27261

Closed
wants to merge 3 commits into from
Closed

Prevent supplied resource is not a valid stream resource #27261

wants to merge 3 commits into from

Conversation

liamdemafelix
Copy link

@liamdemafelix liamdemafelix commented May 29, 2021

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)

@skjnldsv skjnldsv added 3. to review Waiting for reviews bug labels May 29, 2021
@skjnldsv skjnldsv added this to the Nextcloud 22 milestone May 29, 2021
@blizzz blizzz mentioned this pull request Jun 2, 2021
57 tasks
Co-authored-by: Andreas Skorczyk <me@andreas-sk.de>
@MorrisJobke MorrisJobke mentioned this pull request Jun 10, 2021
59 tasks
This was referenced Jun 16, 2021
@blizzz blizzz modified the milestones: Nextcloud 22, Nextcloud 23 Jun 24, 2021
@skjnldsv skjnldsv mentioned this pull request Oct 13, 2021
@skjnldsv
Copy link
Member

Fixed upstream already

@skjnldsv skjnldsv closed this Oct 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants