-
Notifications
You must be signed in to change notification settings - Fork 100
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
Implement file path sanitation #273
Conversation
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.
Cppcheck (reported by Codacy) found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.
c501e2e
to
28f31a1
Compare
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.
Merge the proposed changes in #274
5b30fbd
to
da86b50
Compare
Merged using a separate commit. |
cfe2b3f
to
40e2355
Compare
40e2355
to
e79c32c
Compare
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.
Check mk/tests.mk
for existing unit test programs along with mock functions.
d108622
to
52e1dab
Compare
52e1dab
to
6aabc72
Compare
34daec4
to
6d3bc33
Compare
dbd1d4a
to
683a5bc
Compare
683a5bc
to
e3108b2
Compare
e3108b2
to
a758a35
Compare
f889251
to
5c5286b
Compare
Is it time to close #137? If so, append |
1df5044
to
c7d1f74
Compare
Yes. Commit messages changed as requested |
c7d1f74
to
ff14419
Compare
…21#137) The logic is ported from Golang to C. Reference code: - https://cs.opensource.google/go/go/+/refs/tags/go1.21.4:src/path/path.go;l=70 - https://cs.opensource.google/go/go/+/refs/tags/go1.21.4:src/path/path_test.go Close sysprog21#137
ff14419
to
087dd28
Compare
As mentioned in issue #137, the elf path is not sanitized before opening, which might be a security risk. This PR addresses this issue by porting the path sanitation logic from Golang to C.
Reference code: https://cs.opensource.google/go/go/+/refs/tags/go1.21.4:src/path/path.go;l=70
Unit test -> #274