-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Remove the calls to realpath in FileIntegrity checks #22723
Conversation
… user. Calling realpath on a symlink that was found in the tree, for example, causes Matomo to suggest to the user deleting the target of the symlink. At best this would be a nuisance, and at worst it could be catastrophic (if the user kept a symlink to files outside of Matomo's directory, for example). Fixes matomo-org#16551.
cec8c2f
to
981479a
Compare
This issue is in "needs review" but there has been no activity for 7 days. ping @matomo-org/core-reviewers |
@danielpunkass Thanks a lot for your contribution, really appreciated 🎉 I tested this locally and while it does work and achieve what is expected, we do lose a little user-friendliness with the messaging to our users. Removing Maybe an idea would be to change it to use something like: This seems to get the symlink location with the full absolute path and the resulting @matomo-org/core-reviewers any other opinions here? |
This issue is in "needs review" but there has been no activity for 7 days. ping @matomo-org/core-reviewers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@danielpunkass I don't have push access to your fork, but i've made some suggested changes, can you add them as commits and we can see how the tests react 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incorporate changes suggested by @caddoo
Incorporate @caddoo's suggested changes Co-authored-by: caddoo <[email protected]>
I will figure out how to quiet the style errors. |
Description:
If the FileIntegrity check discovers an unexpected symlink in the source tree, it causes Matomo to suggest to the user deleting the target of the symlink, instead of the symlink itself. At best this would be a nuisance, and at worst it could be catastrophic (if the user kept a symlink to files outside of Matomo's directory, for example). Fixes #16551.
Review