File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change 3
3
extern " C" int luaopen_socket_core ( lua_State *state );
4
4
5
5
int parseWhitelist ();
6
+ void clearWhitelist ();
6
7
enum : int
7
8
{
8
9
PARSE_SUCCESS = 0 ,
@@ -39,6 +40,10 @@ GMOD_MODULE_OPEN( )
39
40
40
41
GMOD_MODULE_CLOSE ( )
41
42
{
43
+ #ifdef USE_WHITELIST
44
+ clearWhitelist ();
45
+ #endif
46
+
42
47
LUA->PushNil ( );
43
48
LUA->SetField ( GarrysMod::Lua::INDEX_GLOBAL, " socket" );
44
49
return 0 ;
Original file line number Diff line number Diff line change @@ -43,6 +43,11 @@ int parseWhitelist()
43
43
return PARSE_SUCCESS;
44
44
}
45
45
46
+ void clearWhitelist ()
47
+ {
48
+ whitelist.clear ();
49
+ }
50
+
46
51
bool isSafe (const char * pNodeName, const char * pServiceName)
47
52
{
48
53
std::map<std::string, std::set<std::string> >::iterator domain = whitelist.find (pNodeName);
You can’t perform that action at this time.
0 commit comments