sasl_usercloak: make the magic string more specific

Require '/account' at the end of the spoof, rather than
'account' anywhere.
This commit is contained in:
Ed Kellett 2020-01-02 15:49:15 +00:00
parent 5d5603b6ef
commit cdeca37ec3
No known key found for this signature in database
GPG key ID: CB9986DEF342FABC

View file

@ -46,10 +46,12 @@ check_new_user(void *vdata)
if (EmptyString(source_p->user->suser))
return;
char *accountpart = strstr(source_p->orighost, "account");
if (!accountpart)
char *accountpart = strstr(source_p->orighost, "/account");
if (!accountpart || accountpart[8] != '\0')
return;
accountpart += 1;
char buf[HOSTLEN];
memset(buf, 0, sizeof(buf));
char *dst = buf;