Skip to content

Catch more invalid cache source storage paths - #39698

Merged
skjnldsv merged 2 commits into
nextcloud:masterfrom
joshtrichards:invalid-source-storage-path-catch
Aug 5, 2023
Merged

Catch more invalid cache source storage paths#39698
skjnldsv merged 2 commits into
nextcloud:masterfrom
joshtrichards:invalid-source-storage-path-catch

Conversation

@joshtrichards

@joshtrichardsjoshtrichards commented Aug 3, 2023

Copy link
Copy Markdown
Member

Summary

OC\Files\Cache\Cache::get can return string|false|null, not just string|false.

Since null is just as much of an indicator that something is wrong with the specified cache source storage path, handle it same way as false.

TODO

  • ...

Checklist

OC\Files\Cache\Cache::get can return string|false|null, not just string|false.
- nextcloud#26270 added handling of false, but null is needed too.
- Well, or we change the default $resullt to false, but I'm not sure if that has other ramifications and the real need here is to simply catch situations where the cache source storage path is not valid for whatever reason
Related: nextcloud#19009
Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
@solracsfsolracsf added the 3. to review Waiting for reviews label Aug 4, 2023
@solracsfsolracsf added this to the Nextcloud 28 milestone Aug 4, 2023
Comment threadlib/private/Files/Cache/Cache.php Outdated

@solracsfsolracsf left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Appart my comment above, makes sense.

@solracsf

Copy link
Copy Markdown
Member

/backport to stable27

@solracsf

Copy link
Copy Markdown
Member

/backport to stable26

@solracsf

Copy link
Copy Markdown
Member

/backport to stable25

@solracsf
solracsf requested a review from skjnldsvAugust 4, 2023 09:11
Co-authored-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
@skjnldsvskjnldsv added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Aug 5, 2023
@skjnldsv
skjnldsv merged commit b27a2e9 into nextcloud:masterAug 5, 2023
@solracsf

Copy link
Copy Markdown
Member

/backport to stable26

@solracsf

Copy link
Copy Markdown
Member

/backport to stable25

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

Labels

4. to releaseReady to be released and/or waiting for tests to finish

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@joshtrichards@solracsf@skjnldsv