summaryrefslogtreecommitdiff
path: root/src/ne_auth.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ne_auth.c')
-rw-r--r--src/ne_auth.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/ne_auth.c b/src/ne_auth.c
index 73a11bc..ad36382 100644
--- a/src/ne_auth.c
+++ b/src/ne_auth.c
@@ -489,15 +489,23 @@ static int basic_challenge(auth_session *sess, int attempt,
sess->basic = ne_base64((unsigned char *)tmp, strlen(tmp));
ne_free(tmp);
+ /* Paranoia. */
+ memset(password, 0, sizeof password);
+
+ if (sess->context == AUTH_CONNECT) {
+ /* For proxy auth w/TLS, auth is limited to handling CONNECT
+ * request, no need to derive the "scope" path. */
+ return 0;
+ }
+
if (sess->ndomains != 1) {
sess->domains = ne_realloc(sess->domains, sizeof(*sess->domains));
sess->ndomains = 1;
}
- sess->domains[0] = get_scope_path(uri);
- NE_DEBUG(NE_DBG_HTTPAUTH, "auth: Basic auth scope is: %s\n", sess->domains[0]);
- /* Paranoia. */
- memset(password, 0, sizeof password);
+ sess->domains[0] = get_scope_path(uri);
+ NE_DEBUG(NE_DBG_HTTPAUTH, "auth: Basic auth scope is: %s\n",
+ sess->domains[0]);
return 0;
}