mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 05:45:59 +03:00
Adds function removeBracketsIfNeeded to utils
This commit is contained in:
parent
7317079945
commit
74a34261ab
@ -133,6 +133,14 @@ int urldecode_nonstrict_inplace(unsigned char *input,
|
||||
}
|
||||
|
||||
|
||||
std::string removeBracketsIfNeeded(std::string a) {
|
||||
if ((a.at(0) == '"') and (a.at(a.length()-1) == '"')) {
|
||||
a.pop_back();
|
||||
a.erase(0, 1);
|
||||
}
|
||||
return a;
|
||||
}
|
||||
|
||||
|
||||
std::vector<std::string> split(std::string str, char delimiter) {
|
||||
std::vector<std::string> internal;
|
||||
|
@ -60,6 +60,7 @@ namespace modsecurity {
|
||||
std::vector<std::string> expandEnv(const std::string& var, int flags);
|
||||
std::string find_resource(const std::string& file,
|
||||
const std::string& param);
|
||||
std::string removeBracketsIfNeeded(std::string a);
|
||||
} // namespace modsecurity
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user