| Age | Commit message (Collapse) | Author |
|
Annotate the common logging function sp_log_msgf() with the format
attribute so compilers can check the used format string and passed
arguments for discrepancies.
Adjust the lineno printing by using %zu and the type size_t
consistently.
|
|
Please GCC:
In file included from /usr/include/php/20220829/Zend/zend.h:30,
from /usr/include/php/20220829/main/php.h:31,
from /usr/include/php/20220829/main/SAPI.h:20,
from src/php_snuffleupagus.h:37,
from src/sp_ifilter.c:1:
src/sp_pcre_compat.h: In function 'sp_regexp_compile':
src/sp_pcre_compat.h:38:36: warning: '__zend_calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Wcalloc-transposed-args]
38 | sp_regexp *ret = pecalloc(sizeof(sp_regexp), 1, 1);
| ^~~~~~~~~
/usr/include/php/20220829/Zend/zend_alloc.h:199:72: note: in definition of macro 'pecalloc'
199 | #define pecalloc(nmemb, size, persistent) ((persistent)?__zend_calloc((nmemb), (size)):ecalloc((nmemb), (size)))
| ^~~~~
src/sp_pcre_compat.h:38:36: note: earlier argument should specify number of elements, later size of each element
38 | sp_regexp *ret = pecalloc(sizeof(sp_regexp), 1, 1);
| ^~~~~~~~~
/usr/include/php/20220829/Zend/zend_alloc.h:199:72: note: in definition of macro 'pecalloc'
199 | #define pecalloc(nmemb, size, persistent) ((persistent)?__zend_calloc((nmemb), (size)):ecalloc((nmemb), (size)))
| ^~~~~
|
|
|
|
|
|
|
|
This reverts commit 90bdf39000d2f09534b387d39203819995fb948e.
Caused compilation failure with PHP compiled with ZTS.
|
|
|
|
|
|
|
|
Bug introduced in https://github.com/jvoisin/snuffleupagus/commit/7c2d1d7d2713c0fa6bda63c376baf25d9f3d712c
|
|
|
|
|
|
|
|
|
|
* 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
|
|
fixed related unittests
|
|
|
|
|
|
|
|
keywords
|
|
|
|
|
|
|
|
|
|
Add the possibility to log directly into the syslog, instead of using php's log system.
|
|
|
|
|
|
This should fix the following:
```C
snuffleupagus/src/sp_config.c:193:10: warning: implicit declaration of function 'getline' is invalid in C99 [-Wimplicit-function-declaration]
while (getline(&lineptr, &n, fd) > 0) {
^
1 warning generated.
```
|
|
|
|
|
|
Ensure that certificates are verified in curl
should close #47
|
|
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
|
|
|
|
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*`
|
|
* Trying to fix sloppy comparison https://github.com/nbs-system/snuffleupagus/issues/10 by
modifying php's opcode
|
|
Implement session encryption.
|
|
|
|
This should close #129
|
|
|
|
Implement whitelist in eval
|
|
Add support for eval filtering, only blacklist for now
|
|
Thanks to @fr33tux for the bug report ♥
|
|
- `clang-format --style="{BasedOnStyle: google, SortIncludes: false}" -i snuffleu*.c sp_*.c sp_*.h`
- Update the documentation accordingly
|
|
It's now possible to encrypt cookies matching a specific regexp.
This should close #106
|
|
Since we now have sp_list and sp_tree, it makes sense to specify that
nodes are only for lists.
|
|
Thanks to this huge commit from @xXx-caillou-xXx, we can now write amazingly flexible rules.
|
|
This is done by using the "samesite" cookie attribute.
|
|
References #43.
|
|
|
|
|