summaryrefslogtreecommitdiff
path: root/src/sp_sloppy.c (follow)
AgeCommit message (Collapse)Author
2022-08-21Fix sloppy comparisonjvoisin
2022-06-27Move compile_file and compile_string to sp_execute.cjvoisin
2021-10-21added some array initialization, just in case.Ben Fuhrmannek
2021-09-23config is stack allocated now + some code improvements (see details)Ben Fuhrmannek
* for easier memory manegement, the entire sp_config struct was merged into snuffleupagus_globals and allocated on stack where possible * SNUFFLEUPAGUS_G() can be written as SPG(), which is faster to type and easier to read * execution_depth is re-initialized to 0 for each request * function calls with inline string and length parameters consistently use ZEND_STRL instead of sizeof()-1 * execution is actually hooked if recursion protection is enabled * some line breaks were removed to make the code more readable
2021-05-09Add some guard to prevent hooking recursionjvoisin
This shouldn't be necessary, but better safe than sorry.
2021-01-01Constify a functionjvoisin
2020-11-30Fix an other type mismatch in zend_compile_stringjvoisin
2020-11-30Fix the type of zend_compile_string (#357)jvoisin
This was changed in https://github.com/php/php-src/commit/f5dbebd82e642b1d1af462b486fc392ecff2c67a
2020-07-04Run clang-format on the codebasejvoisin
2019-10-24Improve a bit the compatibility with php8jvoisin
- Apparently, TSRMLS_C and TSRMLS_FETCH aren't defined anymore, so we have to manually define them to nothing - PHP8 constified a bit some strings, which is great, so we should do the same to avoid warnings
2019-06-20Fix snufflepagus_globals linking issues and one mac compatibility issuebef
2019-02-23Try to unify the includesjvoisin
2019-02-23Add php8 to travis and fix php7.4jvoisin
- Use clang-format on the code - Improve portability wrt. php8 - Fix php7.4 compatibility. See https://dustri.org/b/fixing-snuffleupagus-sloppy-comparison-on-array_keys-for-php74.html for a detailed writeup
2018-10-06Bump a bit the coveragejvoisin
* `setcookie` doesn't always return `true` anymore * clang-format * Cookies with invalid decryption are dropped, but the request isn't anymore * faulty unserialize are now dumpable
2018-10-05Fix segfault array keyskkadosh
Many thanks to @xXx-caillou-xXx for finding the true root cause and fixing the issue ♥
2018-09-03Fix #241 segfault on 32-bit related to bad protype (#242)Remi Collet
This should close #241
2018-08-28Fix some compilation warningsxXx-caillou-xXx
2018-08-28Add array_search and array_keys hooks to kill sloppy comparisonsxXx-caillou-xXx
2018-08-27Enable strict mode for `in_array` with sloppy_comparisonxXx-caillou-xXx
2018-08-09Fix a possible crash/hang in floppy-comparisonjvoisin
This is in the same spirit than the previous commit
2018-07-13Fix an invalid readxXx-caillou-xXx
2018-07-13Massively optimize how rules are handledxXx-caillou-xXx
This commit does a lot of things: - Use hashtables instead of lists to store the rules - Rules that can be applied at launch time won't be tried at runtime - Improve feedback when writing nonsensical rules - Make intensive use of `zend_string` instead of `char*`
2018-07-09Trying to fix sloppy comparison (#186)jvoisin
* Trying to fix sloppy comparison https://github.com/nbs-system/snuffleupagus/issues/10 by modifying php's opcode