Permalink
Browse files

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 <psychon@znc.in>
  • Loading branch information...
1 parent f69aeff commit ce10cee260edceaa64daec4672fbdf3a60647af0 @psychon psychon committed Feb 20, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 znc.h
View
2 znc.h
@@ -104,7 +104,7 @@ class CZNC {
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; }

0 comments on commit ce10cee

Please sign in to comment.