notify: warn if the spec contains one of '"\

These aren't processed as a shell does, so this may surprise users
release-v0.5.0
moneromooo-monero 5 years ago committed by wowario
parent bfd24d58c6
commit a9ef699472
No known key found for this signature in database
GPG Key ID: 24DCBE762DE9C111

@ -47,6 +47,8 @@ Notify::Notify(const char *spec)
boost::split(args, spec, boost::is_any_of(" "));
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];
CHECK_AND_ASSERT_THROW_MES(epee::file_io_utils::is_file_exist(filename), "File not found: " << filename);
}

Loading…
Cancel
Save