X-Forwarded-For: verify the whole chain, from the end

This commit is contained in:
Alexey Sokolov
2013-11-14 22:22:32 +04:00
parent ccbc469168
commit 3e56f093f2
6 changed files with 59 additions and 36 deletions
+1
View File
@@ -56,6 +56,7 @@ public:
void ParseURI();
void GetPage();
static CString GetDate(time_t tm = 0);
virtual CString GetRemoteIP();
// Cookies
CString GetRequestCookie(const CString& sKey) const;
-1
View File
@@ -130,7 +130,6 @@ public:
CSmartPtr<CWebSession> GetSession();
virtual CString GetRemoteIP();
virtual Csock* GetSockObj(const CString& sHost, unsigned short uPort);
static CString GetSkinPath(const CString& sSkinName);
CModule* GetModule() const { return (CModule*) m_pModule; }
+5 -5
View File
@@ -66,9 +66,9 @@ public:
void ClearBindHosts();
bool AddBindHost(const CString& sHost);
bool RemBindHost(const CString& sHost);
void ClearAllowProxy();
bool AddAllowProxy(const CString& sHost);
bool RemAllowProxy(const CString& sHost);
void ClearTrustedProxies();
bool AddTrustedProxy(const CString& sHost);
bool RemTrustedProxy(const CString& sHost);
void Broadcast(const CString& sMessage, bool bAdminOnly = false,
CUser* pSkipUser = NULL, CClient* pSkipClient = NULL);
void AddBytesRead(unsigned long long u) { m_uBytesRead += u; }
@@ -120,7 +120,7 @@ public:
const CString& GetConfigFile() const { return m_sConfigFile; }
bool WritePemFile();
const VCString& GetBindHosts() const { return m_vsBindHosts; }
const VCString& GetAllowProxies() const { return m_vsAllowProxies; }
const VCString& GetTrustedProxies() const { return m_vsTrustedProxies; }
const std::vector<CListener*>& GetListeners() const { return m_vpListeners; }
time_t TimeStarted() const { return m_TimeStarted; }
unsigned int GetMaxBufferSize() const { return m_uiMaxBufferSize; }
@@ -208,7 +208,7 @@ protected:
CString m_sPidFile;
CString m_sSSLCertFile;
VCString m_vsBindHosts;
VCString m_vsAllowProxies;
VCString m_vsTrustedProxies;
VCString m_vsMotd;
CFile* m_pLockFile;
unsigned int m_uiConnectDelay;