if (*s++ != '}')
{
expand_string_message = string_sprintf(
- US"missing '}' closing arg %d of extract", i+1);
+ "missing '}' closing arg %d of extract", i+1);
goto EXPAND_FAILED_CURLY;
}
else
{
expand_string_message = string_sprintf(
- US"missing '{' for arg %d of extract", i+1);
+ "missing '{' for arg %d of extract", i+1);
goto EXPAND_FAILED_CURLY;
}
}
if (*s != '{') /*}*/
{
expand_string_message = string_sprintf(
- US"missing '{' for arg %d of listextract", i+1);
+ "missing '{' for arg %d of listextract", i+1);
goto EXPAND_FAILED_CURLY;
}
if (*s++ != '}')
{
expand_string_message = string_sprintf(
- US"missing '}' closing arg %d of listextract", i+1);
+ "missing '}' closing arg %d of listextract", i+1);
goto EXPAND_FAILED_CURLY;
}
+/* Avoid potentially exposing a password in a string about to be logged */
+
+uschar *
+expand_hide_passwords(uschar * s)
+{
+return ( ( Ustrstr(s, "failed to expand") != NULL
+ || Ustrstr(s, "expansion of ") != NULL
+ )
+ && ( Ustrstr(s, "mysql") != NULL
+ || Ustrstr(s, "pgsql") != NULL
+ || Ustrstr(s, "redis") != NULL
+ || Ustrstr(s, "sqlite") != NULL
+ || Ustrstr(s, "ldap:") != NULL
+ || Ustrstr(s, "ldaps:") != NULL
+ || Ustrstr(s, "ldapi:") != NULL
+ || Ustrstr(s, "ldapdn:") != NULL
+ || Ustrstr(s, "ldapm:") != NULL
+ ) )
+ ? US"Temporary internal error" : s;
+}
+
+
+
/*************************************************
**************************************************