mirror of
https://github.com/openappsec/openappsec.git
synced 2025-11-18 02:00:38 +03:00
Compare commits
1 Commits
exception-
...
orianelou-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2d25abb582 |
@@ -1093,9 +1093,12 @@ void Waf2Transaction::add_request_hdr(const char* name, int name_len, const char
|
||||
void Waf2Transaction::end_request_hdrs() {
|
||||
dbgFlow(D_WAAP) << "[transaction:" << this << "] end_request_hdrs";
|
||||
m_isScanningRequired = setCurrentAssetContext();
|
||||
|
||||
extractEnvSourceIdentifier();
|
||||
|
||||
if (m_siteConfig != NULL)
|
||||
{
|
||||
// getOverrideState also extracts the source identifier and populates m_source_identifier
|
||||
// but the State itself is not needed now
|
||||
Waap::Override::State overrideState = getOverrideState(m_siteConfig);
|
||||
}
|
||||
m_pWaapAssetState->m_requestsMonitor->logSourceHit(m_source_identifier);
|
||||
IdentifiersEvent ids(m_source_identifier, m_pWaapAssetState->m_assetId);
|
||||
ids.notify();
|
||||
|
||||
@@ -594,6 +594,8 @@ Waap::Override::State Waf2Transaction::getOverrideState(IWaapConfig* sitePolicy)
|
||||
overrideState.applyOverride(*overridePolicy, WaapOverrideFunctor(*this), m_matchedOverrideIds, true);
|
||||
}
|
||||
|
||||
extractEnvSourceIdentifier();
|
||||
|
||||
if (overridePolicy) { // later we will run response overrides
|
||||
m_overrideState.applyOverride(*overridePolicy, WaapOverrideFunctor(*this), m_matchedOverrideIds, false);
|
||||
}
|
||||
|
||||
@@ -39,10 +39,10 @@ kind: Exception
|
||||
metadata:
|
||||
name: exception-example
|
||||
spec:
|
||||
action: accept
|
||||
action: drop
|
||||
condition:
|
||||
- key: countryCode
|
||||
value: US
|
||||
- key: sourceIP
|
||||
value: 127.0.0.1
|
||||
|
||||
---
|
||||
apiVersion: openappsec.io/v1beta2
|
||||
|
||||
Reference in New Issue
Block a user