qrexec: automatically translate '$' to '@' in target name specification

After the change of target keywords, apply transparen translation from
old names. This will avoid breaking calls from not updated VMs. Apply
this change only in stable branch.
This commit is contained in:
Marek Marczykowski-Górecki 2018-02-19 02:18:32 +01:00
parent f481671782
commit 6b0fef6dba
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -632,6 +632,10 @@ static void sanitize_name(char * untrusted_s_signed, char *extra_allowed_chars)
continue;
if (*untrusted_s >= '0' && *untrusted_s <= '9')
continue;
if (*untrusted_s == '$' && strchr(extra_allowed_chars, '@')) {
*untrusted_s = '@';
continue;
}
if (*untrusted_s == '_' ||
*untrusted_s == '-' ||
*untrusted_s == '.')