Sanitize server name for log files
It could contain invalid chars or log to an arbitrary directory
This commit is contained in:
parent
a2c2abd60a
commit
35f97b65c1
|
@ -527,9 +527,12 @@ log_create_pathname (char *servname, char *channame, char *netname)
|
||||||
channame = log_create_filename (channame);
|
channame = log_create_filename (channame);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
servname = log_create_filename (servname);
|
||||||
|
|
||||||
log_insert_vars (fname, sizeof (fname), prefs.hex_irc_logmask, channame, netname, servname);
|
log_insert_vars (fname, sizeof (fname), prefs.hex_irc_logmask, channame, netname, servname);
|
||||||
g_free (channame);
|
g_free (channame);
|
||||||
g_free (netname);
|
g_free (netname);
|
||||||
|
g_free (servname);
|
||||||
|
|
||||||
/* insert time/date */
|
/* insert time/date */
|
||||||
now = time (NULL);
|
now = time (NULL);
|
||||||
|
|
Loading…
Reference in New Issue