MXS-1929: Output const strings from serviceGetUser

The values aren't meant to be modified by the caller.
This commit is contained in:
Markus Mäkelä
2018-08-02 23:01:44 +03:00
parent 7d6338d65b
commit b20decfe1c
10 changed files with 60 additions and 67 deletions

View File

@ -108,9 +108,11 @@ http_auth_authenticate(DCB *dcb)
{
int rval = 1;
HTTP_AUTH *ses = (HTTP_AUTH*)dcb->data;
char *user, *pw;
serviceGetUser(dcb->service, &user, &pw);
pw = decrypt_password(pw);
const char* user;
const char* password;
serviceGetUser(dcb->service, &user, &password);
char* pw = decrypt_password(password);
if (ses && strcmp(ses->user, user) == 0 && strcmp(ses->pw, pw) == 0)
{