Skip to content

Commit

Permalink
2.4.16.1: fix parsing OIDCXForwardedHeaders; closes #1250
Browse files Browse the repository at this point in the history
thanks @maltesmann

Signed-off-by: Hans Zandbelt <[email protected]>
  • Loading branch information
zandbelt committed Aug 26, 2024
1 parent d77b02a commit abd3e49
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
08/26/2024
- fix parsing OIDCXForwardedHeaders; closes #1250; thanks @maltesmann
- release 2.4.16.1

08/23/2024
- release 2.4.16

Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AC_INIT([mod_auth_openidc],[2.4.16],[[email protected]])
AC_INIT([mod_auth_openidc],[2.4.16.1],[[email protected]])

AC_SUBST(NAMEVER, AC_PACKAGE_TARNAME()-AC_PACKAGE_VERSION())

Expand Down
6 changes: 5 additions & 1 deletion src/cfg/cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,12 @@ const char *oidc_cmd_x_forwarded_headers_set(cmd_parms *cmd, void *m, const char
{OIDC_HDR_FORWARDED, OIDC_HTTP_HDR_FORWARDED}};
int v = OIDC_CONFIG_POS_INT_UNSET;
const char *rv = oidc_cfg_parse_option(cmd->pool, options, OIDC_CFG_OPTIONS_SIZE(options), arg, &v);
if ((rv == NULL) && (v != OIDC_CONFIG_POS_INT_UNSET))
if ((rv == NULL) && (v != OIDC_CONFIG_POS_INT_UNSET)) {
// NB: cannot use |= with UNSET/-1 !
if (cfg->x_forwarded_headers == OIDC_CONFIG_POS_INT_UNSET)
cfg->x_forwarded_headers = OIDC_HDR_NONE;
cfg->x_forwarded_headers |= v;
}
return OIDC_CONFIG_DIR_RV(cmd, rv);
}

Expand Down

0 comments on commit abd3e49

Please sign in to comment.