Skip to content

Commit

Permalink
auth: Do not import empty certificate username
Browse files Browse the repository at this point in the history
  • Loading branch information
cmouse authored and villesavolainen committed Jan 25, 2019
1 parent ff6de09 commit 3c0b876
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/auth/auth-request.c
Expand Up @@ -453,7 +453,7 @@ bool auth_request_import_auth(struct auth_request *request,
else if (strcmp(key, "valid-client-cert") == 0)
request->valid_client_cert = TRUE;
else if (strcmp(key, "cert_username") == 0) {
if (request->set->ssl_username_from_cert) {
if (request->set->ssl_username_from_cert && *value != '\0') {
/* get username from SSL certificate. it overrides
the username given by the auth mechanism. */
request->user = p_strdup(request->pool, value);
Expand Down

0 comments on commit 3c0b876

Please sign in to comment.