mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-15 23:55:03 +03:00
Convert 'normalise' into 'normalize' throughout, but support the previous version for backward compatibility (MODSEC-103)
This commit is contained in:
parent
1fb6f974db
commit
853b1f9fc8
@ -1148,7 +1148,7 @@ int ansi_c_sequences_decode_inplace(unsigned char *input, int input_len) {
|
||||
*
|
||||
* IMP1 Assumes NUL-terminated
|
||||
*/
|
||||
int normalise_path_inplace(unsigned char *input, int input_len, int win, int *changed) {
|
||||
int normalize_path_inplace(unsigned char *input, int input_len, int win, int *changed) {
|
||||
unsigned char *d = input;
|
||||
int i, count;
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
#include "modsecurity.h"
|
||||
|
||||
int DSOLOCAL normalise_path_inplace(unsigned char *input, int len, int win, int *changed);
|
||||
int DSOLOCAL normalize_path_inplace(unsigned char *input, int len, int win, int *changed);
|
||||
|
||||
int DSOLOCAL parse_boolean(const char *input);
|
||||
|
||||
|
@ -451,27 +451,27 @@ static int msre_fn_escapeSeqDecode_execute(apr_pool_t *mptmp, unsigned char *inp
|
||||
return (*rval_len == input_len ? 0 : 1);
|
||||
}
|
||||
|
||||
/* normalisePath */
|
||||
/* normalizePath */
|
||||
|
||||
static int msre_fn_normalisePath_execute(apr_pool_t *mptmp, unsigned char *input,
|
||||
static int msre_fn_normalizePath_execute(apr_pool_t *mptmp, unsigned char *input,
|
||||
long int input_len, char **rval, long int *rval_len)
|
||||
{
|
||||
int changed;
|
||||
|
||||
*rval_len = normalise_path_inplace(input, input_len, 0, &changed);
|
||||
*rval_len = normalize_path_inplace(input, input_len, 0, &changed);
|
||||
*rval = (char *)input;
|
||||
|
||||
return changed;
|
||||
}
|
||||
|
||||
/* normalisePathWin */
|
||||
/* normalizePathWin */
|
||||
|
||||
static int msre_fn_normalisePathWin_execute(apr_pool_t *mptmp, unsigned char *input,
|
||||
static int msre_fn_normalizePathWin_execute(apr_pool_t *mptmp, unsigned char *input,
|
||||
long int input_len, char **rval, long int *rval_len)
|
||||
{
|
||||
int changed;
|
||||
|
||||
*rval_len = normalise_path_inplace(input, input_len, 1, &changed);
|
||||
*rval_len = normalize_path_inplace(input, input_len, 1, &changed);
|
||||
*rval = (char *)input;
|
||||
|
||||
return changed;
|
||||
@ -683,13 +683,25 @@ void msre_engine_register_default_tfns(msre_engine *engine) {
|
||||
/* normalisePath */
|
||||
msre_engine_tfn_register(engine,
|
||||
"normalisePath",
|
||||
msre_fn_normalisePath_execute
|
||||
msre_fn_normalizePath_execute
|
||||
);
|
||||
|
||||
/* normalizePath */
|
||||
msre_engine_tfn_register(engine,
|
||||
"normalizePath",
|
||||
msre_fn_normalizePath_execute
|
||||
);
|
||||
|
||||
/* normalisePathWin */
|
||||
msre_engine_tfn_register(engine,
|
||||
"normalisePathWin",
|
||||
msre_fn_normalisePathWin_execute
|
||||
msre_fn_normalizePathWin_execute
|
||||
);
|
||||
|
||||
/* normalizePathWin */
|
||||
msre_engine_tfn_register(engine,
|
||||
"normalizePathWin",
|
||||
msre_fn_normalizePathWin_execute
|
||||
);
|
||||
|
||||
/* parityEven7bit */
|
||||
|
Loading…
x
Reference in New Issue
Block a user