diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-04-09 11:07:29 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-04-09 11:07:29 +0000 |
commit | ed184bd1510c4cff6a53a7a5bfafaac48eece9e0 (patch) | |
tree | 7087917684d9ae7f89e664534dd18c796bdd9472 /src/inspircd.cpp | |
parent | eb0f039d0f66dc2fc920ed49cf0539ca186f6fe2 (diff) |
Added security function that removes paths from filenames
Stripped paths from filenames in /rehash and /modules
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@464 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r-- | src/inspircd.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 81dee527e..0b348f529 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -4046,7 +4046,7 @@ void handle_rehash(char **parameters, int pcnt, userrec *user) WriteServ(user->fd,"382 %s %s :Rehashing",user->nick,CONFIG_FILE); ReadConfig(); FOREACH_MOD OnRehash(); - WriteOpers("%s is rehashing config file %s",user->nick,CONFIG_FILE); + WriteOpers("%s is rehashing config file %s",user->nick,CleanFilename(CONFIG_FILE)); } @@ -4055,6 +4055,7 @@ int usercnt(void) return clientlist.size(); } + int usercount_invisible(void) { int c = 0; @@ -4344,7 +4345,9 @@ void handle_modules(char **parameters, int pcnt, userrec *user) for (int i = 0; i < module_names.size(); i++) { Version V = modules[i]->GetVersion(); - WriteServ(user->fd,"900 %s :0x%08lx %d.%d.%d.%d %s",user->nick,modules[i],V.Major,V.Minor,V.Revision,V.Build,module_names[i].c_str()); + char modulename[MAXBUF]; + strncpy(modulename,module_names[i].c_str(),256); + WriteServ(user->fd,"900 %s :0x%08lx %d.%d.%d.%d %s",user->nick,modules[i],V.Major,V.Minor,V.Revision,V.Build,CleanFilename(modulename)); } } |