mirror of
https://github.com/Ylianst/MeshAgent
synced 2026-01-03 17:13:16 +00:00
1. Fixed compiler warnings for PAC related code
2. Updated clipboard helper, to fix compiler warning in generated code 3. Updated message-box to sanitize input values to prevent possible exploit
This commit is contained in:
@@ -90,7 +90,7 @@ function nativeBase64(name)
|
||||
{
|
||||
var value = Buffer.from(getJSModule(name)).toString('base64');
|
||||
var ret = "char *" + name + " = NULL;\n";
|
||||
ret += (name + '[ILibBase64Decode("' + value + '", ' + value.length + ', &' + name + ')] = 0;\n');
|
||||
ret += (name + '[ILibBase64Decode((unsigned char*)"' + value + '", ' + value.length + ', (unsigned char **)&' + name + ')] = 0;\n');
|
||||
ret += ('duk_peval_string_noresult(ex, ' + name + ');\n');
|
||||
ret += ('free(' + name + ');\n');
|
||||
module.exports(ret);
|
||||
|
||||
@@ -179,7 +179,6 @@ function messageBox()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function linux_messageBox()
|
||||
{
|
||||
this._ObjectID = 'message-box';
|
||||
@@ -375,7 +374,7 @@ function linux_messageBox()
|
||||
return (ret);
|
||||
}
|
||||
// GNOME/ZENITY
|
||||
ret._options = { title: title.trim(), caption: caption.trim(), timeout: timeout, layout: layout, zenity: this.zenity };
|
||||
ret._options = { title: title.trim().split('').join('\\'), caption: caption.trim().split('').join('\\'), timeout: timeout, layout: layout, zenity: this.zenity };
|
||||
var parms = ['zenity'];
|
||||
if (Array.isArray(layout))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user