Skip to content

CSRF Fixes and Remote Code Execution Prevention#1634

Merged
muarachmann merged 10 commits into
LibreHealthIO:masterfrom
maggienegm:csrf-fix-forms
Jul 19, 2021
Merged

CSRF Fixes and Remote Code Execution Prevention#1634
muarachmann merged 10 commits into
LibreHealthIO:masterfrom
maggienegm:csrf-fix-forms

Conversation

@maggienegm
Copy link
Copy Markdown
Contributor

@maggienegm maggienegm commented Aug 1, 2020

This fix removes CSRF vulnerabilities and also prevents remote code execution attempts.

@maggienegm
Copy link
Copy Markdown
Contributor Author

Its necessary to type cast the inputs before supplying to hash_hmac, interesting things might occur if that is not done ( type juggling vulnerability ), if $secondToken is a user controlled input, if an array is passed, hash_hmac will return null.
For more details:
https://www.youtube.com/watch?v=MpeaSNERwQA

Added type casting to hash_hmac()'s input per @naveen17797 's comment in PR #1625

@maggienegm maggienegm changed the title Prevent csrf in vulnerable files with forms CSRF Fixes and Remote Code Execution Prevention Aug 8, 2020
@muarachmann muarachmann merged commit ec27daa into LibreHealthIO:master Jul 19, 2021
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.

3 participants