US"pwcheck",
US"queue_running",
US"radius",
- US"saslauthd"
+ US"saslauthd",
+ US"tainted"
};
enum {
ECOND_PWCHECK,
ECOND_QUEUE_RUNNING,
ECOND_RADIUS,
- ECOND_SASLAUTHD
+ ECOND_SASLAUTHD,
+ ECOND_TAINTED
};
/* def: tests for a non-empty variable, or for the existence of a header. If
yield == NULL we are in a skipping state, and don't care about the answer. */
+ case ECOND_TAINTED:
case ECOND_DEF:
{
uschar * t;
if (!(t = find_variable(name, TRUE, yield == NULL, NULL)))
{
expand_string_message = name[0]
- ? string_sprintf("unknown variable \"%s\" after \"def:\"", name)
- : US"variable name omitted after \"def:\"";
+ ? string_sprintf("unknown variable \"%s\" after \"%s:\"", name, cond_type == ECOND_DEF ? "def" : "tainted")
+ : string_sprintf("variable name omitted after \"%s:\"", cond_type == ECOND_DEF ? "def" : "tainted");
check_variable_error_message(name);
return NULL;
}
- if (yield) *yield = (t[0] != 0) == testfor;
+ if (yield) *yield = (cond_type == ECOND_DEF ? (t[0] != 0) : is_tainted(name)) == testfor;
}
return s;