diff options
author | Omar Polo <op@omarpolo.com> | 2021-02-01 13:48:23 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2021-02-01 13:48:23 +0000 |
commit | 3e5418099fb2d44e0ffa9c65af66657cb28b466b (patch) | |
tree | e22e2aee0527466da92684715c68df4cc00fa51f /ex.c | |
parent | ee655e64d757e972d3fa3748b6dc4ade8a829035 (diff) |
[cgi] always set some variables
Diffstat (limited to 'ex.c')
-rw-r--r-- | ex.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -298,12 +298,14 @@ launch_cgi(struct iri *iri, const char *spath, char *relpath, safe_setenv("SERVER_PROTOCOL", "GEMINI"); safe_setenv("SERVER_SOFTWARE", "gmid/1.5"); - if (ruser != NULL) { + if (ruser != NULL) safe_setenv("AUTH_TYPE", "Certificate"); - safe_setenv("REMOTE_USER", ruser); - safe_setenv("TLS_CLIENT_ISSUER", cissuer); - safe_setenv("TLS_CLIENT_HASH", chash); - } + else + safe_setenv("AUTH_TYPE", ""); + + safe_setenv("REMOTE_USER", ruser); + safe_setenv("TLS_CLIENT_ISSUER", cissuer); + safe_setenv("TLS_CLIENT_HASH", chash); strlcpy(path, argv[0], sizeof(path)); pwd = dirname(path); |