mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 19:47:47 +03:00
Adds support to AUTH_TYPE variable
This commit is contained in:
14
src/utils.cc
14
src/utils.cc
@@ -26,7 +26,7 @@
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
|
||||
#include <cstring>
|
||||
|
||||
#if defined _MSC_VER
|
||||
#include <direct.h>
|
||||
@@ -90,6 +90,18 @@ void chomp(std::string *str) {
|
||||
}
|
||||
|
||||
|
||||
std::string tolower(std::string str) {
|
||||
std::locale loc;
|
||||
std::string value;
|
||||
|
||||
for (std::string::size_type i=0; i < str.length(); ++i) {
|
||||
value.assign(value + std::tolower(str[i], loc));
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
|
||||
const char SAFE[256] = {
|
||||
/* 0 1 2 3 4 5 6 7 8 9 A B C D E F */
|
||||
/* 0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
|
Reference in New Issue
Block a user