mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2026-01-13 06:57:10 +03:00
Cleanup path nomalization routine and add some further regression tests (MODSEC-123).
This commit is contained in:
@@ -1172,10 +1172,8 @@ int normalise_path_inplace(unsigned char *input, int input_len, int win, int *ch
|
||||
|
||||
*changed = 0;
|
||||
|
||||
/* Need more than one character to normalize */
|
||||
if (input_len < 1) {
|
||||
return ldst;
|
||||
}
|
||||
/* Need at least one byte to normalize */
|
||||
if (input_len <= 0) return 0;
|
||||
|
||||
/*
|
||||
* ENH: Deal with UNC and drive letters?
|
||||
|
||||
@@ -24,6 +24,13 @@
|
||||
},
|
||||
|
||||
### Basic
|
||||
{
|
||||
type => "tfn",
|
||||
name => "normalisePath",
|
||||
input => "x",
|
||||
output => "x",
|
||||
ret => 0,
|
||||
},
|
||||
{
|
||||
type => "tfn",
|
||||
name => "normalisePath",
|
||||
|
||||
@@ -24,6 +24,13 @@
|
||||
},
|
||||
|
||||
### Basics
|
||||
{
|
||||
type => "tfn",
|
||||
name => "normalisePathWin",
|
||||
input => "x",
|
||||
output => "x",
|
||||
ret => 0,
|
||||
},
|
||||
{
|
||||
type => "tfn",
|
||||
name => "normalisePathWin",
|
||||
|
||||
Reference in New Issue
Block a user