fix(deps): update module github.com/cyphar/filepath-securejoin to v0.4.0 #25001
+96
−21
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
v0.3.6
->v0.4.0
Release Notes
cyphar/filepath-securejoin (github.com/cyphar/filepath-securejoin)
v0.4.0
Compare Source
This release primarily includes a few minor breaking changes to make the
MkdirAll and SecureJoin interfaces more robust against accidental
misuse.
SecureJoin(VFS)
will now return an error if the providedroot
is not afilepath.Clean
'd path.While it is ultimately the responsibility of the caller to ensure the root is
a safe path to use, passing a path like
/symlink/..
as a root would resultin the
SecureJoin
'd path being placed in/
even though/symlink/..
might be a different directory, and so we should more strongly discourage
such usage.
All major users of
securejoin.SecureJoin
already ensure that the paths theyprovide are safe (and this is ultimately a question of user error), but
removing this foot-gun is probably a good idea. Of course, this is
necessarily a breaking API change (though we expect no real users to be
affected by it).
Thanks to Erik Sjölund, who initially
reported this issue as a possible security issue.
MkdirAll
andMkdirHandle
now take anos.FileMode
-style mode argumentinstead of a raw
unix.S_*
-style mode argument, which may cause compile-timetype errors depending on how you use
filepath-securejoin
. For most users,there will be no change in behaviour aside from the type change (as the
bottom
0o777
bits are the same in both formats, and most users are probablyonly using those bits).
However, if you were using
unix.S_ISVTX
to set the sticky bit withMkdirAll(Handle)
you will need to switch toos.ModeSticky
otherwise youwill get a runtime error with this update. In addition, the error message you
will get from passing
unix.S_ISUID
andunix.S_ISGID
will be different asthey are treated as invalid bits now (note that previously passing said bits
was also an error).
Thanks to the following contributors for helping make this release
possible:
Signed-off-by: Aleksa Sarai [email protected]
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Never, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.