diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2015-02-07 23:59:29 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2015-02-07 23:59:29 +0000 |
commit | 876ac822db47c16575b9182a442f418557f87776 (patch) | |
tree | 867f1f7649761da62f0da030ca679e898f0285ff /usr.sbin/httpd | |
parent | 7fe21b974dce46da42e34aa7177321d767f5ed13 (diff) |
spacing
Diffstat (limited to 'usr.sbin/httpd')
-rw-r--r-- | usr.sbin/httpd/server_http.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/usr.sbin/httpd/server_http.c b/usr.sbin/httpd/server_http.c index d5acb05737f..0085aabf94e 100644 --- a/usr.sbin/httpd/server_http.c +++ b/usr.sbin/httpd/server_http.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server_http.c,v 1.72 2015/02/07 01:23:12 reyk Exp $ */ +/* $OpenBSD: server_http.c,v 1.73 2015/02/07 23:59:28 reyk Exp $ */ /* * Copyright (c) 2006 - 2015 Reyk Floeter <reyk@openbsd.org> @@ -126,15 +126,16 @@ server_httpdesc_free(struct http_descriptor *desc) int server_http_authenticate(struct server_config *srv_conf, struct client *clt) { - FILE *fp = NULL; - struct http_descriptor *desc = clt->clt_descreq; - struct auth *auth = srv_conf->auth; - struct kv *ba, key; - size_t linesize = 0; - ssize_t linelen; - int ret = -1; - char *line = NULL, decoded[1024]; - char *clt_user = NULL, *clt_pass = NULL, *user = NULL, *pass = NULL; + char decoded[1024]; + FILE *fp = NULL; + struct http_descriptor *desc = clt->clt_descreq; + struct auth *auth = srv_conf->auth; + struct kv *ba, key; + size_t linesize = 0; + ssize_t linelen; + int ret = -1; + char *line = NULL, *user = NULL, *pass = NULL; + char *clt_user = NULL, *clt_pass = NULL; memset(decoded, 0, sizeof(decoded)); key.kv_key = "Authorization"; @@ -146,7 +147,7 @@ server_http_authenticate(struct server_config *srv_conf, struct client *clt) if (strncmp(ba->kv_value, "Basic ", strlen("Basic ")) != 0) goto done; - if (b64_pton(strchr(ba->kv_value, ' ') + 1, decoded, + if (b64_pton(strchr(ba->kv_value, ' ') + 1, (u_int8_t *)decoded, sizeof(decoded)) <= 0) goto done; |