mirror of https://github.com/OpenVPN/openvpn-gui
A fixup for script-security error message
and parse the error msg from OpenVPN proposed
in patch #688 (patchwork)
(to be squashed with previous commit c7462ab
)
Signed-off-by: Selva Nair <selva.nair@gmail.com>
pull/271/head
parent
5177cca014
commit
df0f4f1786
|
@ -141,8 +141,9 @@ static void
|
|||
SaveLastError(connection_t *c, const char *msg)
|
||||
{
|
||||
/* If we have enforced script security and there is script error, translate/re-word the error */
|
||||
if (get_script_security(c) != SSEC_UNDEF
|
||||
&& strstr(msg, "'--script-security 2' or higher is required to call user-defined scripts"))
|
||||
if (!o.disable_ssec_override
|
||||
&& get_script_security(c) != SSEC_UNDEF
|
||||
&& strstr(msg, "disallowed by script-security setting"))
|
||||
{
|
||||
_sntprintf_0(c->last_error, LoadLocalizedString(IDS_ERR_SCRIPT_OVERRIDE));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue