diff options
author | David Reid <dreid@apache.org> | 2005-02-05 15:20:26 +0100 |
---|---|---|
committer | David Reid <dreid@apache.org> | 2005-02-05 15:20:26 +0100 |
commit | 98d1aa261a313f0d8f1693f7b8565063ba59ab82 (patch) | |
tree | 85012777f4a0d19902857c3d2f2dfc2c35912ddf /modules | |
parent | Ignore both PATH_INFO as well as PATH_TRANSLATED to avoid hiccups (diff) | |
download | apache2-98d1aa261a313f0d8f1693f7b8565063ba59ab82.tar.xz apache2-98d1aa261a313f0d8f1693f7b8565063ba59ab82.zip |
Change where we set r->user if we're setting it from a
client certificate.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@151493 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules')
-rw-r--r-- | modules/ssl/ssl_engine_kernel.c | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/modules/ssl/ssl_engine_kernel.c b/modules/ssl/ssl_engine_kernel.c index efa7230b17..1fe1b3b0cb 100644 --- a/modules/ssl/ssl_engine_kernel.c +++ b/modules/ssl/ssl_engine_kernel.c @@ -799,6 +799,20 @@ int ssl_hook_Access(request_rec *r) } } + /* If we're trying to have the user name set from a client + * certificate then we need to set it here. This should be safe as + * the user name probably isn't important from an auth checking point + * of view as the certificate supplied acts in that capacity. + * However, if FakeAuth is being used then this isn't the case so + * we need to postpone setting the username until later. + */ + if ((dc->nOptions & SSL_OPT_FAKEBASICAUTH) == 0 && dc->szUserName) { + char *val = ssl_var_lookup(r->pool, r->server, r->connection, + r, (char *)dc->szUserName); + if (val && val[0]) + r->user = val; + } + /* * Else access is granted from our point of view (except vendor * handlers override). But we have to return DECLINED here instead @@ -1043,17 +1057,6 @@ int ssl_hook_Fixup(request_rec *r) } /* - * Set r->user if requested - */ - if (dc->szUserName) { - val = ssl_var_lookup(r->pool, r->server, r->connection, - r, (char *)dc->szUserName); - if (val && val[0]) { - r->user = val; - } - } - - /* * Annotate the SSI/CGI environment with standard SSL information */ /* the always present HTTPS (=HTTP over SSL) flag! */ |