diff options
Diffstat (limited to 'src/basicauth.c')
-rw-r--r-- | src/basicauth.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/basicauth.c b/src/basicauth.c index 7092657..d6c2420 100644 --- a/src/basicauth.c +++ b/src/basicauth.c @@ -83,16 +83,15 @@ void basicauth_add (vector_t authlist, int basicauth_check (vector_t authlist, const char *authstring) { ssize_t vl, i; - size_t al, el; + size_t el; const char* entry; vl = vector_length (authlist); if (vl == -EINVAL) return 0; - al = strlen (authstring); for (i = 0; i < vl; i++) { entry = vector_getentry (authlist, i, &el); - if (strncmp (authstring, entry, al) == 0) + if (strcmp (authstring, entry) == 0) return 1; } return 0; |