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

fix: cache key file safe characters #39

Merged
merged 1 commit into from
May 8, 2024

Conversation

Josh-Walker-GM
Copy link
Collaborator

When triaging commits over from next to release/minor/v7.5.0 I was getting an error when the cache was being written to disk. The cause was that the cache key contained path separators and ultimately we were trying to write to a subdirectory that didn't exist.

Here I simply replace any characters that might not be safe in a filename with an underscore. Assuming consistent use of the getKey function and that no one attempt to build the key themselves without this change then this should be totally fine.

@Josh-Walker-GM Josh-Walker-GM self-assigned this May 8, 2024
@Josh-Walker-GM Josh-Walker-GM merged commit 1e558b9 into main May 8, 2024
1 check passed
@Josh-Walker-GM Josh-Walker-GM deleted the jgmw/cache-key-filesystem-safe branch May 8, 2024 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant