]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Prevent path names from being specified in modules, and move moduledir to a <path...
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>
Mon, 19 Oct 2009 02:59:52 +0000 (02:59 +0000)
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>
Mon, 19 Oct 2009 02:59:52 +0000 (02:59 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11914 e03df62e-2008-0410-955e-edbf42e46eb7

src/configreader.cpp
src/modules.cpp

index b586db5316c0ebc902a156e70d929ed01b3d23f7..80d123842e1756b4c77a48d1fd00e27db0914a51 100644 (file)
@@ -791,7 +791,7 @@ void ServerConfig::Fill()
        AdminName = ConfValue("admin")->getString("name", "");
        AdminEmail = ConfValue("admin")->getString("email", "null@example.com");
        AdminNick = ConfValue("admin")->getString("nick", "admin");
-       ModPath = options->getString("moduledir", MOD_PATH);
+       ModPath = ConfValue("path")->getString("moduledir", MOD_PATH);
        NetBufferSize = ConfValue("performance")->getInt("netbuffersize", 10240);
        MaxWhoResults = ConfValue("performance")->getInt("maxwho", 1024);
        dns_timeout = ConfValue("dns")->getInt("timeout", 5);
index 2dafc88643565cf3729469dc59c4b6db4b61e567..8957b4bb622522b23ca725e9ed306ae5b8760065 100644 (file)
@@ -321,6 +321,9 @@ std::string& ModuleManager::LastError()
 
 bool ModuleManager::Load(const char* filename)
 {
+       /* Don't allow people to specify paths for modules, it doesn't work as expected */
+       if (strchr(filename, '/'))
+               return false;
        /* Do we have a glob pattern in the filename?
         * The user wants to load multiple modules which
         * match the pattern.