Do not calculate the challenge if authentication fails.
authorJuho Vähä-Herttua <juhovh@iki.fi>
Tue, 20 Mar 2012 20:04:04 +0000 (22:04 +0200)
committerJuho Vähä-Herttua <juhovh@iki.fi>
Wed, 16 May 2012 21:33:32 +0000 (00:33 +0300)
src/lib/raop.c

index 1994ed373e833d18399ab079ac0fddcad17a29aa..cd99b53b77c19b3f65ecd56dd0814889ae9da87b 100644 (file)
@@ -175,7 +175,7 @@ conn_request(void *ptr, http_request_t *request, http_response_t **response)
        http_response_add_header(res, "Apple-Jack-Status", "connected; type=analog");
 
        challenge = http_request_get_header(request, "Apple-Challenge");
-       if (challenge) {
+       if (!require_auth && challenge) {
                char signature[MAX_SIGNATURE_LEN];
 
                memset(signature, 0, sizeof(signature));