Skip to content

Commit

Permalink
avoid warning about a self-provided default value in provider config
Browse files Browse the repository at this point in the history
Signed-off-by: Hans Zandbelt <[email protected]>
  • Loading branch information
zandbelt committed Mar 11, 2024
1 parent 31de9e2 commit bf1453a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
03/11/2024
- avoid warning about setting a self-provided default value in the provider config

03/07/2024
- OIDCProviderSignedJwksUri: accept verification key set formatted as either JWK or JWKS
see #1191; thanks @psteniusubi
Expand Down
11 changes: 7 additions & 4 deletions src/metadata.c
Original file line number Diff line number Diff line change
Expand Up @@ -1090,9 +1090,12 @@ void oidc_metadata_get_valid_int(request_rec *r, const json_t *json, const char
oidc_json_object_get_int(json, key, &v, default_int_value);
const char *rv = valid_int_function(r->pool, v);
if (rv != NULL) {
oidc_warn(r, "integer value %d for key \"%s\" is invalid: %s; using default: %d", v, key, rv,
default_int_value);
v = default_int_value;
// assume the provided default is valid, i.e. "unset" -1, so nothing to warn about
if (v != default_int_value) {
oidc_warn(r, "integer value %d for key \"%s\" is invalid: %s; using default: %d", v, key, rv,
default_int_value);
v = default_int_value;
}
}
*int_value = v;
}
Expand All @@ -1110,7 +1113,7 @@ static void oidc_metadata_get_jwks(request_rec *r, json_t *json, apr_array_heade

if (!json_is_array(keys)) {
oidc_error(r, "trying to parse a list of JWKs but the value for key \"%s\" is not a JSON array",
OIDC_JOSE_JWKS_KEYS_STR);
OIDC_JOSE_JWKS_KEYS_STR);
return;
}

Expand Down

0 comments on commit bf1453a

Please sign in to comment.