and now of course strcasecmp

This commit is contained in:
Jan-Piet Mens
2022-08-07 12:45:31 +02:00
parent fdaccd3b74
commit 87d0fb81b0

View File

@@ -539,8 +539,8 @@ void do_request(struct udata *ud, UT_string *username, UT_string *device, char *
json_delete(o);
continue;
}
if (strcmp(elem(o, "user"), UB(username)) != 0 ||
strcmp(elem(o, "device"), UB(device)) != 0) {
if (strcasecmp(elem(o, "user"), UB(username)) != 0 ||
strcasecmp(elem(o, "device"), UB(device)) != 0) {
olog(LOG_DEBUG, "Skipping %s: owner mismatch", path);
json_delete(o);
continue;
@@ -599,8 +599,8 @@ void do_request(struct udata *ud, UT_string *username, UT_string *device, char *
json_delete(r);
return;
}
if (strcmp(elem(o, "user"), UB(username)) != 0 ||
strcmp(elem(o, "device"), UB(device)) != 0) {
if (strcasecmp(elem(o, "user"), UB(username)) != 0 ||
strcasecmp(elem(o, "device"), UB(device)) != 0) {
olog(LOG_DEBUG, "Skipping %s: owner mismatch", uuid);
json_delete(o);
return;