Skip to content

Commit a16b46d

Browse files
committed
3.3.1: clean WWW-Authenticate header in HTTP 200 responses
- clean WWW-Authenticate header in main request as well if this is a subrequest; closes #42; this avoids the WWW-Authenticate header to be sent in HTTP 200 responses; thanks @ErmakovDmitriy - depend on liboauth2 1.4.5.3 - release 3.3.1 Signed-off-by: Hans Zandbelt <hans.zandbelt@openidc.com>
1 parent 397ca71 commit a16b46d

3 files changed

Lines changed: 15 additions & 4 deletions

File tree

ChangeLog

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1+
01/21/2023
2+
- clean WWW-Authenticate header in main request as well if this is a subrequest; closes #42
3+
this avoids the WWW-Authenticate header to be sent in HTTP 200 responses; thanks @ErmakovDmitriy
4+
- depend on liboauth2 1.4.5.3
5+
- release 3.3.1
6+
17
12/06/2022
28
- change Makefile install procedure
3-
- depend on liboauth 1.4.5.2
9+
- depend on liboauth2 1.4.5.2
410
- release 3.3.0
511

612
07/27/2022
@@ -14,6 +20,8 @@
1420
- depend on liboauth2 1.4.2.1 with fixed iat slack validation defaults
1521
- set WWW-Authenticate environment variable to allow for complex Require logic; see
1622
https://github.com/zmartzone/mod_auth_openidc/discussions/572
23+
example:
24+
Header always append WWW-Authenticate %{OAUTH2_BEARER_SCOPE_ERROR}e "expr=(%{REQUEST_STATUS} == 401) && (-n reqenv('OAUTH2_BEARER_SCOPE_ERROR'))"
1725
- release 3.2.2
1826

1927
02/01/2021

configure.ac

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
AC_INIT([mod_oauth2],[3.3.0],[hans.zandbelt@zmartzone.eu])
1+
AC_INIT([mod_oauth2],[3.3.1],[hans.zandbelt@zmartzone.eu])
22

33
AM_INIT_AUTOMAKE([foreign no-define subdir-objects])
44
AC_CONFIG_MACRO_DIRS([m4])
@@ -27,11 +27,11 @@ AC_SUBST(APR_LIBS)
2727
AC_SUBST(APACHE_CFLAGS)
2828
AC_ARG_VAR(APXS_OPTS, [additional command line options to pass to apxs])
2929

30-
PKG_CHECK_MODULES(OAUTH2, [liboauth2 >= 1.4.5.2])
30+
PKG_CHECK_MODULES(OAUTH2, [liboauth2 >= 1.4.5.3])
3131
AC_SUBST(OAUTH2_CFLAGS)
3232
AC_SUBST(OAUTH2_LIBS)
3333

34-
PKG_CHECK_MODULES(OAUTH2_APACHE, [liboauth2_apache >= 1.4.5.2])
34+
PKG_CHECK_MODULES(OAUTH2_APACHE, [liboauth2_apache >= 1.4.5.3])
3535
AC_SUBST(OAUTH2_APACHE_CFLAGS)
3636
AC_SUBST(OAUTH2_APACHE_LIBS)
3737

src/mod_oauth2.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,9 @@ oauth2_authz_checker(request_rec *r, const char *require_args,
229229
OAUTH2_HTTP_HDR_WWW_AUTHENTICATE);
230230
apr_table_unset(r->err_headers_out,
231231
OAUTH2_HTTP_HDR_WWW_AUTHENTICATE);
232+
if (r->main)
233+
apr_table_unset(r->main->err_headers_out,
234+
OAUTH2_HTTP_HDR_WWW_AUTHENTICATE);
232235
oauth2_debug(ctx->log,
233236
"setting environment variable %s to \"%s\" for "
234237
"usage in mod_headers",

0 commit comments

Comments
 (0)