summaryrefslogtreecommitdiff
path: root/src/sp_utils.c (follow)
AgeCommit message (Collapse)Author
2020-08-12Allow empty configuration (#342)jvoisin
This commit allows php to run (with a warning) if there is no specified snuffleupagus configuration, instead of refusing to start.
2020-07-22refactoring sp_log_* (#340)Giovanni
Co-authored-by: Giovanni Dante Grazioli <giovanni.dantegrazioli@nbs-system.com>
2020-07-21Fixed issue on impossible bailout.Giovanni Dante Grazioli
2020-07-21Fix #338 - added log type if type is simulation, drop or log. (#339)Giovanni
Co-authored-by: Giovanni Dante Grazioli <giovanni.dantegrazioli@nbs-system.com>
2020-07-12More constificationjvoisin
2020-07-12Use $_SERVER['REMOTE_ADDR'] in last resort to get the client's ip addrjvoisin
2020-07-08Add a couple of `restrict`jvoisin
2020-07-04Fix a small typojvoisin
2020-07-04Reorder some declarationjvoisin
So that the syslog part is tight as possible
2020-07-04Run clang-format on the codebasejvoisin
2020-07-04Factorize how snuffleupagus gets client's ip addrjvoisin
2020-07-04Fix a syslog-related issuejvoisin
Previously, the syslog logging would always go to LOG_ERR no matter the severity.
2019-11-03Log ip addresseskkadosh
2019-08-31Support direct syslog loggingThibault "bui" Koechlin
Add the possibility to log directly into the syslog, instead of using php's log system.
2019-06-20Fix snufflepagus_globals linking issues and one mac compatibility issuebef
2019-05-14Fix the cookie's handling for PHP7.3+jvoisin
PHP 7.3+ added a new prototype for the cookie setting mechanism, breaking our ghetto samesite-injection, this commit takes care of it.
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-25Minor formatting issuejvoisin
2018-10-09Improve mb_string hooking logicjvoisin
2018-10-06Bump coverage againjvoisin
2018-10-06Bump coverage againjvoisin
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-06Remove sp_terminate and bump a bit the coveragejvoisin
2018-09-10Minor code simplificationjvoisin
2018-09-03Fix #241 segfault on 32-bit related to bad protype (#242)Remi Collet
This should close #241
2018-08-30Minor code cleanupxXx-caillou-xXx
2018-08-30Match on ret improvementsxXx-caillou-xXx
This commit does two things: - Implement matching on calltraces for ret - Implement matching on ret of user functions if the return value is not used.
2018-08-28Fix some compilation warningsxXx-caillou-xXx
2018-08-28Use php's logging functionsxXx-caillou-xXx
This commit replace our usage of `php_log_err` with `zend_error`. This should allow administrators to display errors in the webpage, should they want to; and to properly manipulate the verbosity's level. This should close #217
2018-07-13Yet an other pass of clang-formatjvoisin
2018-07-13Fix various possible integer overflowsxXx-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-05-15Refactor the encryption process to extract encrypt/decrypt functions (#176)kkadosh
Refactor the encryption process to extract encrypt/decrypt functions
2018-05-03Uniformise some logssimon MAGNIN-FEYSOT
This commit will make certain logs easier to parse.
2018-03-19The filename filter is now matching on callsite instead of implemsite (#167)kkadosh
* Add match on the file where the function is called * Add the test * Constify some params * Fix potentiel null deref * Return more before if execute_data is NULL
2018-03-08Make travis happy.jvoisin
2018-03-08Minor code simplificationjvoisin
2018-03-08Remove some duplicate codejvoisin
2018-03-02Implement dump() for execution of writable PHP fileskkadosh
2018-02-27Implements .dump() for unserialize and fix some related testskkadosh
2018-02-05Massive simplification of functions hookingjvoisin
2018-02-05Compatibility layer for pcre2jvoisin
This should close #129
2018-02-05Fix a oncst-related warningjvoisin
2018-01-17Remove useless "head" member in our linked lists implementationsimon MAGNIN-FEYSOT
This should close #85
2018-01-17Fix a minor warningjvoisin
2018-01-15Minor simplificationjvoisin
2018-01-15Fix an other off-by-onejvoisin
2018-01-15Fix some memleaksjvoisin
2018-01-11Remove some legacy codejvoisin