mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
notify: warn if the spec contains one of '"\
These aren't processed as a shell does, so this may surprise users
This commit is contained in:
parent
13852678e1
commit
ff95921668
1 changed files with 2 additions and 0 deletions
|
@ -49,6 +49,8 @@ Notify::Notify(const char *spec)
|
||||||
|
|
||||||
boost::split(args, spec, boost::is_any_of(" "));
|
boost::split(args, spec, boost::is_any_of(" "));
|
||||||
CHECK_AND_ASSERT_THROW_MES(args.size() > 0, "Failed to parse spec");
|
CHECK_AND_ASSERT_THROW_MES(args.size() > 0, "Failed to parse spec");
|
||||||
|
if (strchr(spec, '\'') || strchr(spec, '\"') || strchr(spec, '\\'))
|
||||||
|
MWARNING("A notification spec contains a quote or backslash: note that these are handled verbatim, which may not be the intent");
|
||||||
filename = args[0];
|
filename = args[0];
|
||||||
CHECK_AND_ASSERT_THROW_MES(epee::file_io_utils::is_file_exist(filename), "File not found: " << filename);
|
CHECK_AND_ASSERT_THROW_MES(epee::file_io_utils::is_file_exist(filename), "File not found: " << filename);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue