@@ -40,9 +40,9 @@ class Ip_DictElement : public Variable {
4040 void evaluate (Transaction *t,
4141 Rule *rule,
4242 std::vector<const VariableValue *> *l) override {
43- t->m_collections .m_ip_collection ->resolveMultiMatches (m_dictElement,
44- t->m_collections .m_ip_collection_key , l);
45-
43+ t->m_collections .m_ip_collection ->resolveMultiMatches (
44+ m_name, t->m_collections .m_ip_collection_key ,
45+ t-> m_rules -> m_secWebAppId . m_value , l);
4646 }
4747
4848 std::string m_dictElement;
@@ -57,8 +57,9 @@ class Ip_NoDictElement : public Variable {
5757 void evaluate (Transaction *t,
5858 Rule *rule,
5959 std::vector<const VariableValue *> *l) override {
60- t->m_collections .m_ip_collection ->resolveMultiMatches (m_name,
61- t->m_collections .m_ip_collection_key , l);
60+ t->m_collections .m_ip_collection ->resolveMultiMatches (" " ,
61+ t->m_collections .m_ip_collection_key ,
62+ t->m_rules ->m_secWebAppId .m_value , l);
6263 }
6364};
6465
@@ -68,13 +69,14 @@ class Ip_DictElementRegexp : public Variable {
6869 explicit Ip_DictElementRegexp (std::string dictElement)
6970 : Variable(" IP:regex(" + dictElement + " )" ),
7071 m_r(dictElement),
71- m_dictElement(" IP: " + dictElement) { }
72+ m_dictElement(dictElement) { }
7273
7374 void evaluate (Transaction *t,
7475 Rule *rule,
7576 std::vector<const VariableValue *> *l) override {
7677 t->m_collections .m_ip_collection ->resolveRegularExpression (m_dictElement,
77- t->m_collections .m_ip_collection_key , l);
78+ t->m_collections .m_ip_collection_key ,
79+ t->m_rules ->m_secWebAppId .m_value , l);
7880 }
7981
8082 Utils::Regex m_r;
@@ -92,19 +94,24 @@ class Ip_DynamicElement : public Variable {
9294 Rule *rule,
9395 std::vector<const VariableValue *> *l) override {
9496 std::string string = m_string->evaluate (t);
95- t->m_collections .m_ip_collection ->resolveMultiMatches (" IP:" + string,
96- t->m_collections .m_ip_collection_key , l);
97+ t->m_collections .m_ip_collection ->resolveMultiMatches (
98+ string,
99+ t->m_collections .m_ip_collection_key ,
100+ t->m_rules ->m_secWebAppId .m_value , l);
97101 }
98102
99103 void del (Transaction *t, std::string k) {
100104 t->m_collections .m_ip_collection ->del (k,
101- t->m_collections .m_ip_collection_key );
105+ t->m_collections .m_ip_collection_key ,
106+ t->m_rules ->m_secWebAppId .m_value );
102107 }
103108
104109 void storeOrUpdateFirst (Transaction *t, std::string var,
105110 std::string value) {
106111 t->m_collections .m_ip_collection ->storeOrUpdateFirst (
107- var, t->m_collections .m_ip_collection_key , value);
112+ var, t->m_collections .m_ip_collection_key ,
113+ t->m_rules ->m_secWebAppId .m_value ,
114+ value);
108115 }
109116
110117 std::unique_ptr<RunTimeString> m_string;
0 commit comments