mirror of
https://github.com/openappsec/openappsec.git
synced 2025-11-19 18:44:24 +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() {
|
void Waf2Transaction::end_request_hdrs() {
|
||||||
dbgFlow(D_WAAP) << "[transaction:" << this << "] end_request_hdrs";
|
dbgFlow(D_WAAP) << "[transaction:" << this << "] end_request_hdrs";
|
||||||
m_isScanningRequired = setCurrentAssetContext();
|
m_isScanningRequired = setCurrentAssetContext();
|
||||||
|
if (m_siteConfig != NULL)
|
||||||
extractEnvSourceIdentifier();
|
{
|
||||||
|
// 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);
|
m_pWaapAssetState->m_requestsMonitor->logSourceHit(m_source_identifier);
|
||||||
IdentifiersEvent ids(m_source_identifier, m_pWaapAssetState->m_assetId);
|
IdentifiersEvent ids(m_source_identifier, m_pWaapAssetState->m_assetId);
|
||||||
ids.notify();
|
ids.notify();
|
||||||
|
|||||||
@@ -594,6 +594,8 @@ Waap::Override::State Waf2Transaction::getOverrideState(IWaapConfig* sitePolicy)
|
|||||||
overrideState.applyOverride(*overridePolicy, WaapOverrideFunctor(*this), m_matchedOverrideIds, true);
|
overrideState.applyOverride(*overridePolicy, WaapOverrideFunctor(*this), m_matchedOverrideIds, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extractEnvSourceIdentifier();
|
||||||
|
|
||||||
if (overridePolicy) { // later we will run response overrides
|
if (overridePolicy) { // later we will run response overrides
|
||||||
m_overrideState.applyOverride(*overridePolicy, WaapOverrideFunctor(*this), m_matchedOverrideIds, false);
|
m_overrideState.applyOverride(*overridePolicy, WaapOverrideFunctor(*this), m_matchedOverrideIds, false);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,10 +39,10 @@ kind: Exception
|
|||||||
metadata:
|
metadata:
|
||||||
name: exception-example
|
name: exception-example
|
||||||
spec:
|
spec:
|
||||||
action: accept
|
action: drop
|
||||||
condition:
|
condition:
|
||||||
- key: countryCode
|
- key: sourceIP
|
||||||
value: US
|
value: 127.0.0.1
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: openappsec.io/v1beta2
|
apiVersion: openappsec.io/v1beta2
|
||||||
|
|||||||
Reference in New Issue
Block a user