mirror of
https://github.com/openappsec/openappsec.git
synced 2025-09-30 03:34:26 +03:00
sync code
This commit is contained in:
@@ -74,7 +74,9 @@ private:
|
||||
uint
|
||||
moveOnNoMatch(uint offset_from_end, unsigned char first_unmatched_byte) const
|
||||
{
|
||||
dbgAssert(shift.size() > offset_from_end) << "Shift table of the 'data' keyword is shorter than the offset";
|
||||
dbgAssert(shift.size() > offset_from_end)
|
||||
<< AlertInfo(AlertTeam::CORE, "keywords")
|
||||
<< "Shift table of the 'data' keyword is shorter than the offset";
|
||||
|
||||
uint skip_size;
|
||||
if (skip[first_unmatched_byte]>offset_from_end) {
|
||||
@@ -350,7 +352,9 @@ DataKeyword::bytesMatched(const Buffer &buf, uint offset) const
|
||||
MatchStatus
|
||||
DataKeyword::isMatch(const I_KeywordRuntimeState *prev) const
|
||||
{
|
||||
dbgAssert(pattern.size()>0) << "Trying to run on an uninitialized keyword data";
|
||||
dbgAssert(pattern.size()>0)
|
||||
<< AlertInfo(AlertTeam::CORE, "keywords")
|
||||
<< "Trying to run on an uninitialized keyword data";
|
||||
|
||||
dbgDebug(D_KEYWORD) << "Searching for " << dumpHex(pattern);
|
||||
|
||||
|
@@ -143,7 +143,7 @@ jumpKeyword::getStartOffset(uint buf_size, const I_KeywordRuntimeState *prev) co
|
||||
return prev->getOffset(ctx);
|
||||
}
|
||||
}
|
||||
dbgAssert(false) << "Invalid jumping 'from' parameter";
|
||||
dbgAssert(false) << AlertInfo(AlertTeam::CORE, "keywords") << "Invalid jumping 'from' parameter";
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@@ -90,7 +90,7 @@ SentinelRuntimeState::getOffset(const std::string &) const
|
||||
uint
|
||||
SentinelRuntimeState::getVariable(uint var_id) const
|
||||
{
|
||||
dbgAssert(false) << "Could not find the variable ID: " << var_id;
|
||||
dbgAssert(false) << AlertInfo(AlertTeam::CORE, "keywords") << "Could not find the variable ID: " << var_id;
|
||||
return 0;
|
||||
}
|
||||
// LCOV_EXCL_STOP
|
||||
|
@@ -297,7 +297,9 @@ PCREKeyword::getStartOffsetAndLength(uint buf_size, const I_KeywordRuntimeState
|
||||
MatchStatus
|
||||
PCREKeyword::isMatch(const I_KeywordRuntimeState *prev) const
|
||||
{
|
||||
dbgAssert(pcre_machine!=nullptr) << "Trying to run on an uninitialized keyword 'pcre'";
|
||||
dbgAssert(pcre_machine!=nullptr)
|
||||
<< AlertInfo(AlertTeam::CORE, "keywords")
|
||||
<< "Trying to run on an uninitialized keyword 'pcre'";
|
||||
|
||||
auto part = Singleton::Consume<I_Environment>::by<KeywordComp>()->get<Buffer>(static_cast<string>(ctx));
|
||||
|
||||
|
@@ -250,7 +250,9 @@ ComparisonAttr::operator()(int first_val, int second_val) const
|
||||
return first_val >= second_val;
|
||||
}
|
||||
}
|
||||
dbgAssert(false) << "ComparisonAttr::operator found an invalid comparison operator";
|
||||
dbgAssert(false)
|
||||
<< AlertInfo(AlertTeam::CORE, "keywords")
|
||||
<< "ComparisonAttr::operator found an invalid comparison operator";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@@ -131,7 +131,7 @@ StateopKeyword::isMatch(const I_KeywordRuntimeState *prev) const
|
||||
if (table->hasState<KeywordStateop>()) table->getState<KeywordStateop>().removeVariable(var_name);
|
||||
return runNext(prev);
|
||||
} else {
|
||||
dbgAssert(false) << "Impossible 'stateop' keyword without operation";
|
||||
dbgAssert(false) << AlertInfo(AlertTeam::CORE, "keywords") << "Impossible 'stateop' keyword without operation";
|
||||
}
|
||||
|
||||
// If there was no matches and the keyword is effected by other keywords, then we know that the rule won't match
|
||||
|
Reference in New Issue
Block a user