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:
Latchezar Tzvetkoff
2016-07-15 18:01:41 +03:00
committed by lol768
parent 222ae86fcc
commit a9a7f17910
8 changed files with 111 additions and 3 deletions
+2
View File
@@ -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 {