add check for not providing both optin optout flag

This commit is contained in:
hwware 2020-03-29 23:06:50 -04:00 committed by antirez
parent 1907e0f18f
commit 4395889c9e

View File

@ -2326,6 +2326,14 @@ NULL
return;
}
if ((options & CLIENT_TRACKING_OPTIN) && (options & CLIENT_TRACKING_OPTOUT))
{
addReplyError(c,
"You can't specify both OPTIN mode and OPTOUT mode");
zfree(prefix);
return;
}
enableTracking(c,redir,options,prefix,numprefix);
} else if (!strcasecmp(c->argv[2]->ptr,"off")) {
disableTracking(c);