Skip to content

Commit 722dbb9

Browse files
committed
Made Lua sandbox less intrusive, allow DLLs to be loaded by default
1 parent 2b84593 commit 722dbb9

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

globalregistryoptions.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ static tGlobalConfigurationNumericOption GlobalOptionsTable [] = {
2525
{ GLB_OPT (m_bConfirmBeforeSavingVariables ), "ConfirmBeforeSavingVariables", 1 },
2626
{ GLB_OPT (m_bConfirmLogFileClose ), "ConfirmLogFileClose", 1 },
2727
{ GLB_OPT (m_bEnableSpellCheck ), "EnableSpellCheck", 1 },
28-
{ GLB_OPT (m_bEnablePackageLibrary ), "AllowLoadingDlls", 0 },
28+
{ GLB_OPT (m_bEnablePackageLibrary ), "AllowLoadingDlls", 1 },
2929
{ GLB_OPT (m_bF1macro ), "F1macro", 0 },
3030
{ GLB_OPT (m_bFixedFontForEditing ), "FixedFontForEditing", 1 },
3131
{ GLB_OPT (m_bNotepadWordWrap ), "NotepadWordWrap", 1 },
@@ -200,6 +200,7 @@ void CMUSHclientApp::LoadGlobalsFromDatabase (void)
200200
if (m_strLuaScript.IsEmpty ())
201201
{
202202

203+
/*
203204
HRSRC hRsrc;
204205
HGLOBAL hRsrc_text = NULL;
205206
const char * p = NULL;
@@ -222,7 +223,12 @@ void CMUSHclientApp::LoadGlobalsFromDatabase (void)
222223
m_strLuaScript = CString (p, iLength);
223224
else
224225
m_strLuaScript = "-- Lua initialization could not be loaded";
225-
}
226+
*/
227+
m_strLuaScript = "-- Put Lua initialization code (eg. sandbox) here.\r\n"
228+
"-- Possible sandbox here: http://mushclient.com/forum/?id=7344\r\n";
229+
} // end of no sandbox
230+
231+
226232

227233
} // end of CMUSHclientApp::LoadGlobalsFromDatabase
228234

0 commit comments

Comments
 (0)