Skip to content

Conversation

@joshtrichards
Copy link
Member

@joshtrichards joshtrichards commented Jan 6, 2026

Summary

Improve the shouldSecure() method to reliably determine whether a path is a file or directory -- using both the filecache and storage API -- before attempting to open the path. This prevents unnecessary or erroneous fopen() calls on directories (especially in external storage), ensures filecache metadata is prepared for permission checks, and enhances stability and clarity when applying SecureView restrictions.

Helps with nextcloud/server#57342 (and may even resolve it, though there may be additional things going on there - TBD; this improvement is useful either way).

Related: #5171

TODO

  • ...

Checklist

  • Code is properly formatted
  • Sign-off message is added to all commits
  • Documentation (manuals or wiki) has been updated or is not required

…ecache update in shouldSecure()

 fix(richdocuments): robustly determine file/directory before forcing filecache update in shouldSecure()

Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Ready to be reviewed bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: S3 External Storage with Hetzner is causing errors and is slow

2 participants