-
Notifications
You must be signed in to change notification settings - Fork 96
Closed
Description
There are two bugs in this function:
if (str_casecmp(resp->response,
testv[i].precalc_digest) != 0) {
err = EINVAL;
DEBUG_WARNING("[%d]"
" Expected response %s, got %w\n", i,
testv[i].precalc_digest,
resp->response, resp->hash_length);
goto out;
}
- the length of the string should also be checked
- actual response is printed using
%w
which is wrong (should use%s
)
Example:
./test/retest -r -v test_httpauth_digest_response
single testcase: test_httpauth_digest_response
retest: libre version 3.22.0 (arm64/Darwin)
using async polling method 'kqueue'
using datapath './test/data'
regular tests: httpauth: [1] Expected response d22b56ce81bbb59570f0fbbc0ba27210dbbfcb2b23fea371d214722f319dc41c, got 6332326235366365383162626235393537306630666262633062613237323130
test: test_httpauth_digest_response: test failed (Invalid argument [22])
retest: TEST_ERR: /Users/alfredh/git/re/test/main.c:237: (Invalid argument [22])
Metadata
Metadata
Assignees
Labels
No labels