mirror of
https://github.com/openappsec/openappsec.git
synced 2025-11-16 09:21:54 +03:00
sync code
This commit is contained in:
@@ -23,11 +23,12 @@ using namespace std;
|
||||
|
||||
USE_DEBUG_FLAG(D_API);
|
||||
|
||||
RestConn::RestConn(int _fd, I_MainLoop *_mainloop, const I_RestInvoke *_invoke)
|
||||
RestConn::RestConn(int _fd, I_MainLoop *_mainloop, const I_RestInvoke *_invoke, bool is_external)
|
||||
:
|
||||
fd(_fd),
|
||||
mainloop(_mainloop),
|
||||
invoke(_invoke)
|
||||
fd(_fd),
|
||||
mainloop(_mainloop),
|
||||
invoke(_invoke),
|
||||
is_external_ip(is_external)
|
||||
{}
|
||||
|
||||
RestConn::~RestConn()
|
||||
@@ -101,6 +102,12 @@ RestConn::parseConn() const
|
||||
return sendResponse("200 OK", invoke->invokeGet(identifier), false);
|
||||
}
|
||||
|
||||
if (is_external_ip) {
|
||||
dbgWarning(D_API) << "External IP tried to POST";
|
||||
sendResponse("500 Internal Server Error", "", false);
|
||||
stop();
|
||||
}
|
||||
|
||||
stringstream body;
|
||||
body.str(readSize(len));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user