From ce10cee260edceaa64daec4672fbdf3a60647af0 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sun, 20 Feb 2011 11:05:41 +0100 Subject: [PATCH] Correctly handle "~" in SSLCertFile This works correctly because only the config writing/reading accesses CZNC::m_sSSLCertFile directly, everything else goes through this getter. This ChangeDir() call will also "sanitize" the path. E.g. "/foo//..//home///" will be turned into "/home/" and stuff like that. Signed-off-by: Uli Schlachter --- znc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/znc.h b/znc.h index aa8ae19b..cb46ed54 100644 --- a/znc.h +++ b/znc.h @@ -104,7 +104,7 @@ public: CString GetConfPath(bool bAllowMkDir = true) const; CString GetUserPath() const; CString GetModPath() const; - CString GetPemLocation() const { return m_sSSLCertFile; } + CString GetPemLocation() const { return CDir::ChangeDir("", m_sSSLCertFile); } const CString& GetConfigFile() const { return m_sConfigFile; } bool WritePemFile(); const CString& GetISpoofFile() const { return m_sISpoofFile; }