Skip to content

Commit 003fb41

Browse files
committed
release 1.4.5.4: revert header_add/header_set change
Signed-off-by: Hans Zandbelt <hans.zandbelt@zmartzone.eu>
1 parent 31cf194 commit 003fb41

File tree

5 files changed

+14
-9
lines changed

5 files changed

+14
-9
lines changed

ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
01/21/2023
2+
- revert header_add/header_set change
3+
- release 1.4.5.4
4+
15
01/20/2023
26
- don't add WWW-Authenticate header(s) but (over)write a single one; see zmartzone/mod_oauth2#42
37
- release 1.4.5.3

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.3],[hans.zandbelt@zmartzone.eu])
1+
AC_INIT([liboauth2],[1.4.5.4],[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_set(oauth2_log_t *log, const request_rec *r,
312+
void oauth2_apache_hdr_out_add(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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@
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"
58+
#define OAUTH2_ERROR_INSUFFICIENT_USER_AUTHENTICATION \
59+
"insufficient_user_authentication"
5960

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

src/server/apache.c

Lines changed: 6 additions & 6 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_set(ctx->log, ctx->r,
387+
oauth2_apache_hdr_out_add(ctx->log, ctx->r,
388388
OAUTH2_HTTP_HDR_WWW_AUTHENTICATE, hdr);
389389

390390
oauth2_debug(ctx->log, "leave");
@@ -423,11 +423,11 @@ bool oauth2_apache_http_request_set(oauth2_log_t *log,
423423
return rc;
424424
}
425425

426-
bool oauth2_apache_response_header_set(oauth2_log_t *log, void *rec,
426+
bool oauth2_apache_response_header_add(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_set(log, r, name, value);
430+
oauth2_apache_hdr_out_add(log, r, name, value);
431431
return true;
432432
}
433433

@@ -441,7 +441,7 @@ bool oauth2_apache_http_response_set(oauth2_log_t *log,
441441
goto end;
442442

443443
oauth2_http_response_headers_loop(log, response,
444-
oauth2_apache_response_header_set, r);
444+
oauth2_apache_response_header_add, r);
445445

446446
r->status = oauth2_http_response_status_code_get(log, response);
447447

@@ -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_set(oauth2_log_t *log, const request_rec *r,
455+
void oauth2_apache_hdr_out_add(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_set(r->err_headers_out, name, value);
459+
apr_table_add(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)