Skip to content

Commit 31cf194

Browse files
committed
1.4.5.3: don't add WWW-Authenticate header(s); OpenIDC/mod_oauth2#42
Signed-off-by: Hans Zandbelt <hans.zandbelt@openidc.com>
1 parent 5140fcd commit 31cf194

File tree

5 files changed

+11
-6
lines changed

5 files changed

+11
-6
lines changed

ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
01/20/2023
2+
- don't add WWW-Authenticate header(s) but (over)write a single one; see zmartzone/mod_oauth2#42
3+
- release 1.4.5.3
4+
15
12/14/2022
26
- fix NGINX https schema detection
37
- bump to 1.4.5.3dev

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
AC_INIT([liboauth2],[1.4.5.3dev],[hans.zandbelt@zmartzone.eu])
1+
AC_INIT([liboauth2],[1.4.5.3],[hans.zandbelt@zmartzone.eu])
22

33
AM_INIT_AUTOMAKE([foreign no-define subdir-objects])
44
AC_CONFIG_MACRO_DIR([m4])

include/oauth2/apache.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ int oauth2_apache_return_www_authenticate(oauth2_cfg_source_token_t *cfg,
309309
const char *error_description);
310310
bool oauth2_apache_request_header_set(oauth2_log_t *log, void *rec,
311311
const char *name, const char *value);
312-
void oauth2_apache_hdr_out_add(oauth2_log_t *log, const request_rec *r,
312+
void oauth2_apache_hdr_out_set(oauth2_log_t *log, const request_rec *r,
313313
const char *name, const char *value);
314314
void oauth2_apache_scrub_headers(oauth2_apache_request_ctx_t *ctx,
315315
oauth2_cfg_target_pass_t *target_pass);

include/oauth2/oauth2.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
#define OAUTH2_ERROR_INVALID_TOKEN "invalid_token"
5656
#define OAUTH2_ERROR_INVALID_REQUEST "invalid_request"
5757
#define OAUTH2_ERROR_INSUFFICIENT_SCOPE "insufficient_scope"
58+
#define OAUTH2_ERROR_INSUFFICIENT_USER_AUTHENTICATION "insufficient_user_authentication"
5859

5960
#define OAUTH2_CLAIM_ISS "iss"
6061
#define OAUTH2_CLAIM_SUB "sub"

src/server/apache.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ int oauth2_apache_return_www_authenticate(oauth2_cfg_source_token_t *cfg,
384384
hdr = apr_psprintf(ctx->r->pool, "%s, %s=\"%s\"", hdr,
385385
OAUTH2_ERROR_DESCRIPTION, error_description);
386386

387-
oauth2_apache_hdr_out_add(ctx->log, ctx->r,
387+
oauth2_apache_hdr_out_set(ctx->log, ctx->r,
388388
OAUTH2_HTTP_HDR_WWW_AUTHENTICATE, hdr);
389389

390390
oauth2_debug(ctx->log, "leave");
@@ -427,7 +427,7 @@ bool oauth2_apache_response_header_set(oauth2_log_t *log, void *rec,
427427
const char *name, const char *value)
428428
{
429429
request_rec *r = (request_rec *)rec;
430-
oauth2_apache_hdr_out_add(log, r, name, value);
430+
oauth2_apache_hdr_out_set(log, r, name, value);
431431
return true;
432432
}
433433

@@ -452,11 +452,11 @@ bool oauth2_apache_http_response_set(oauth2_log_t *log,
452452
return rc;
453453
}
454454

455-
void oauth2_apache_hdr_out_add(oauth2_log_t *log, const request_rec *r,
455+
void oauth2_apache_hdr_out_set(oauth2_log_t *log, const request_rec *r,
456456
const char *name, const char *value)
457457
{
458458
oauth2_debug(log, "%s: %s", name, value);
459-
apr_table_add(r->err_headers_out, name, value);
459+
apr_table_set(r->err_headers_out, name, value);
460460
}
461461

462462
void oauth2_apache_scrub_headers(oauth2_apache_request_ctx_t *ctx,

0 commit comments

Comments
 (0)