summaryrefslogtreecommitdiff
path: root/src (follow)
AgeCommit message (Collapse)Author
2017-12-21Add coverageslefevre
2017-12-21Refactor a bitslefevre
2017-12-21Add testslefevre
2017-12-21Remove the now useless `validate_str` functionxXx-caillou-xXx
2017-12-21Add testslefevre
2017-12-21Rename, again, some typesjvoisin
2017-12-21Rename sp_node_t to sp_list_nodejvoisin
Since we now have sp_list and sp_tree, it makes sense to specify that nodes are only for lists.
2017-12-21Add some tests (#96)xXx-caillou-xXx
2017-12-21Re-indent a bit a functionjvoisin
2017-12-21Add a constant-related testjvoisin
2017-12-21Minor code cleanupxXx-caillou-xXx
2017-12-20Refactor a bit the sp_tree implementationxXx-caillou-xXx
2017-12-20Better parsing of the rulesxXx-caillou-xXx
Thanks to this huge commit from @xXx-caillou-xXx, we can now write amazingly flexible rules.
2017-12-20Improve the previous commitxXx-caillou-xXx
We can simply use the return value of the original `setcookie` :>
2017-12-20Make `setcookie` return truexXx-caillou-xXx
We forgot to set a return value to the setcookie function, thus always returning false. Since very few frameworks/developers are checking the return value, it went unnoticed until we played with Magento, who effectively checks the return value.
2017-12-19Fix a segfault related to cookiesxXx-caillou-xXx
Apparently, PHP doesn't like when you're trying to save some memory when you're playing with strings.
2017-12-19Rework a bit the order of operationjvoisin
- There is no need to generate the key if the cookie has no value - There is no need to generate the key if the cookie length is invalid - Use yoda condition
2017-12-19remove useless varslefevre
2017-12-19fix double decodingslefevre
2017-12-18Fix cookie encryptionxXx-caillou-xXx
Previously, when a cookie was set with the `httpOnly` flag, it was automatically encrypted, due to a logic flaw. This is now fixed and tested.
2017-12-06Vastly simplify the dumping of zval in `.dump`jvoisin
2017-12-06Fix a format string, thanks to coverityjvoisin
2017-12-05Dump environnement variables (#83)jvoisin
Apparently, PHP thinks that it's a great idea to type environnement variables, because why not.
2017-12-05Add two failing testsjvoisin
2017-12-04Improve the `.dump` filterjvoisin
2017-12-04Fix the configuration parser wrt. non-matching bracketsjvoisin
This validation step is a bit idiotic, but we'll replace it with a proper parser anyway.
2017-12-01Add a test that used to segfaultjvoisin
2017-12-01Fail sooner when not able to create the folder to dumpjvoisin
2017-12-01Vastly simplify the dumping processjvoisin
2017-11-30Minor refactoring and clarificationjvoisin
2017-11-29Code formatting pass on harden-randjvoisin
2017-11-29Add new testsjvoisin
2017-11-29Hide an enum definitionjvoisin
2017-11-29Code-formatting passjvoisin
2017-11-29Add a comment, and improve a bit the performances wrt. vpatchjvoisin
Move the cheapest tests above the expensive ones
2017-11-29Refactoring (#79)jvoisin
Refactoring of should_disable().
2017-11-29Add yet an other testjvoisin
2017-11-29Add even MOAR testsjvoisin
2017-11-29Add a test for `include`jvoisin
2017-11-29Fix segfault in should_drop_on_ret xXx-caillou-xXx
This commit is almost the same than 8df77884f38e7a7334b56aafe2f441567f175af8
2017-11-29Implement eval hookingjvoisin
It's not possible to hook the `eval` builtin like other functions.
2017-11-29Fix segfault in sp_disabled_functions.cxXx-caillou-xXx
There was an off-by-one in `should_disable`, effectively smashing the last byte of the stack canary. This was discovered while building the package for Alpine Linux. Kudos to their hardened toolchain!
2017-11-27Improve our nonce's randomnessjvoisin
2017-11-27Initialize some possibly uninitialized variablesjvoisin
Thanks to coverity
2017-11-24Fix harden_rand (#72)jvoisin
This one was tricky. It was a great half-hour of joy, full of macros, ctags, gdb, radare2, tears, hardcoded `int3`, … to finally find that php calls `return` when it fails to parse some parameters for various reasons, even if everything goes fine. This must be a better way to do this, but this is good enough™ for now. This closes #66
2017-11-24Implement anti csrf measuresxXx-caillou-xXx
This is done by using the "samesite" cookie attribute.
2017-11-13Fix a silly warningjvoisin
2017-11-06Add a failing testjvoisin
2017-11-0653 absolute path (#62)jvoisin
* Add error for relative path
2017-10-31Add a test to match on arrayjvoisin