mirror of
https://github.com/openappsec/openappsec.git
synced 2025-09-30 11:44:29 +03:00
First release of open-appsec source code
This commit is contained in:
@@ -0,0 +1,79 @@
|
||||
// Copyright (C) 2022 Check Point Software Technologies Ltd. All rights reserved.
|
||||
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include "WaapResponseInspectReasons.h"
|
||||
#include "debug.h"
|
||||
|
||||
USE_DEBUG_FLAG(D_WAAP);
|
||||
|
||||
namespace Waap {
|
||||
|
||||
ResponseInspectReasons::ResponseInspectReasons()
|
||||
:
|
||||
openRedirect(false),
|
||||
errorDisclosure(false),
|
||||
errorLimiter(false),
|
||||
rateLimiting(false),
|
||||
collectResponseForLog(false)
|
||||
{
|
||||
}
|
||||
|
||||
bool
|
||||
ResponseInspectReasons::shouldInspect() const
|
||||
{
|
||||
dbgTrace(D_WAAP) << "ResponseInspectReasons::shouldInspect():" <<
|
||||
" OpenRedirect=" << openRedirect <<
|
||||
" ErrorDisclosure=" << errorDisclosure <<
|
||||
" RateLimiting=" << rateLimiting <<
|
||||
" ErrorLimiter=" << errorLimiter <<
|
||||
" collectResponseForLog=" << collectResponseForLog;
|
||||
return openRedirect || errorDisclosure || rateLimiting || errorLimiter || collectResponseForLog;
|
||||
}
|
||||
|
||||
void
|
||||
ResponseInspectReasons::setOpenRedirect(bool flag)
|
||||
{
|
||||
dbgTrace(D_WAAP) << "Change ResponseInspectReasons(OpenRedirect) " << openRedirect << " to " << flag;
|
||||
openRedirect = flag;
|
||||
}
|
||||
|
||||
void
|
||||
ResponseInspectReasons::setErrorDisclosure(bool flag)
|
||||
{
|
||||
dbgTrace(D_WAAP) << "Change ResponseInspectReasons(ErrorDisclosure) " << errorDisclosure << " to " << flag;
|
||||
errorDisclosure = flag;
|
||||
}
|
||||
|
||||
void
|
||||
ResponseInspectReasons::setRateLimiting(bool flag)
|
||||
{
|
||||
dbgTrace(D_WAAP) << "Change ResponseInspectReasons(RateLimiting) " << rateLimiting << " to " << flag;
|
||||
rateLimiting = flag;
|
||||
}
|
||||
|
||||
void
|
||||
ResponseInspectReasons::setErrorLimiter(bool flag)
|
||||
{
|
||||
dbgTrace(D_WAAP) << "Change ResponseInspectReasons(ErrorLimiter) " << errorLimiter << " to " << flag;
|
||||
errorLimiter = flag;
|
||||
}
|
||||
|
||||
void
|
||||
ResponseInspectReasons::setCollectResponseForLog(bool flag)
|
||||
{
|
||||
dbgTrace(D_WAAP) << "Change ResponseInspectReasons(collectResponseForLog) " << collectResponseForLog << " to " <<
|
||||
flag;
|
||||
collectResponseForLog = flag;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user