mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
Adds offset regression tests and assorted fixes on var's offsets
This commit is contained in:
committed by
Felipe Zimmerle
parent
795994bb0e
commit
4ad3574cf2
@@ -75,6 +75,10 @@ class AnchoredSetVariable : public std::unordered_multimap<std::string,
|
||||
|
||||
void set(const std::string &key, const std::string &value,
|
||||
size_t offset);
|
||||
|
||||
void set(const std::string &key, const std::string &value,
|
||||
size_t offset, size_t len);
|
||||
|
||||
void setCopy(std::string key, std::string value, size_t offset);
|
||||
|
||||
void resolve(std::vector<const collection::Variable *> *l);
|
||||
|
@@ -47,8 +47,12 @@ class AnchoredVariable {
|
||||
|
||||
void unset();
|
||||
void set(const std::string &a, size_t offset);
|
||||
void set(const std::string &a, size_t offset, size_t offsetLen);
|
||||
void append(const std::string &a, size_t offset,
|
||||
bool spaceSeparator = false);
|
||||
bool spaceSeparator = false);
|
||||
void append(const std::string &a, size_t offset,
|
||||
bool spaceSeparator, int size);
|
||||
|
||||
void evaluate(std::vector<const collection::Variable *> *l);
|
||||
std::string * evaluate();
|
||||
std::unique_ptr<std::string> resolveFirst();
|
||||
|
@@ -352,11 +352,6 @@ class Transaction : public TransactionAnchoredVariables {
|
||||
*/
|
||||
const char *m_httpVersion;
|
||||
|
||||
/**
|
||||
* Holds the request method: GET, POST, HEAD ...
|
||||
*/
|
||||
const char *m_method;
|
||||
|
||||
/**
|
||||
* Holds the server IP Address
|
||||
*/
|
||||
|
@@ -40,7 +40,7 @@ class VariableOrigin {
|
||||
std::string toText() {
|
||||
std::string offset = std::to_string(m_offset);
|
||||
std::string len = std::to_string(m_length);
|
||||
return "rr:" + offset + "," + len;
|
||||
return "v" + offset + "," + len;
|
||||
}
|
||||
|
||||
int m_length;
|
||||
|
Reference in New Issue
Block a user