Extends the direct access model to other collections

This commit is contained in:
Felipe Zimmerle
2017-01-26 23:13:38 -03:00
committed by Felipe Zimmerle
parent ca24b6bb06
commit f2d149fc5f
157 changed files with 7711 additions and 4959 deletions

View File

@@ -35,13 +35,14 @@ namespace modsecurity {
namespace Variables {
void RemoteUser::evaluateInternal(Transaction *transaction,
void RemoteUser::evaluate(Transaction *transaction,
Rule *rule,
std::vector<const collection::Variable *> *l) {
size_t pos;
std::string base64;
std::string *header = transaction->m_collections.resolveFirst(
"REQUEST_HEADERS:Authorization");
std::unique_ptr<std::string> header = std::move(transaction->m_variableRequestHeaders.resolveFirst(
"Authorization"));
if (header == NULL) {
return;
@@ -61,6 +62,7 @@ void RemoteUser::evaluateInternal(Transaction *transaction,
l->push_back(new collection::Variable(&m_retName,
&transaction->m_variableRemoteUser));
}