mirror of
https://github.com/znc/znc.git
synced 2026-08-06 08:52:57 +02:00
Allow modules to override CSRF protection.
Useful for Web APIs and all other kinds of things. API changes: - Added public CHTTPSock::GetURI() method - Added public CModule::ValidateWebRequestCSRFCheck() method - Made CWebSock::GetCSRFCheck() method public so it can be accessed from CModule - Added public CWebSock::ValidateCSRFCheck() method Other changes: - Added a Sample Web API module (modules/samplewebapi.cpp) and a simple web form with no CSRF check. Implements feature request #1180.
This commit is contained in:
committed by
lol768
parent
222ae86fcc
commit
a9a7f17910
@@ -536,6 +536,8 @@ const CString& CHTTPSock::GetContentType() const { return m_sContentType; }
|
||||
|
||||
const CString& CHTTPSock::GetParamString() const { return m_sPostData; }
|
||||
|
||||
const CString& CHTTPSock::GetURI() const { return m_sURI; }
|
||||
|
||||
const CString& CHTTPSock::GetURIPrefix() const { return m_sURIPrefix; }
|
||||
|
||||
bool CHTTPSock::HasParam(const CString& sName, bool bPost) const {
|
||||
|
||||
Reference in New Issue
Block a user