mirror of
https://github.com/openappsec/openappsec.git
synced 2025-10-01 20:17:43 +03:00
Feb_06_2024-Dev
This commit is contained in:
@@ -2055,31 +2055,18 @@ string extractForwardedIp(const string &x_forwarded_hdr_val)
|
||||
return forward_ip;
|
||||
}
|
||||
|
||||
|
||||
bool isUuid(const string& str) {
|
||||
if (str.length() != 36) {
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool err;
|
||||
static const SingleRegex uuid_detector_re(
|
||||
"[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}",
|
||||
err,
|
||||
"uuid_detector"
|
||||
);
|
||||
// Check if the string matches the UUID format
|
||||
// Check if the string matches the UUID format
|
||||
return uuid_detector_re.hasMatch(str);
|
||||
/*
|
||||
boost::cmatch what;
|
||||
try {
|
||||
static const boost::regex uuidRegex("[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}");
|
||||
// Check if the string matches the UUID format
|
||||
return boost::regex_match(str.c_str(), what, uuidRegex);
|
||||
} catch (std::runtime_error &e) {
|
||||
dbgError(D_WAAP) << e.what();
|
||||
}
|
||||
return false;
|
||||
*/
|
||||
}
|
||||
|
||||
bool isIpAddress(const string &ip_address)
|
||||
|
Reference in New Issue
Block a user