keryx 0.29.6 → 0.29.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "keryx",
3
- "version": "0.29.6",
3
+ "version": "0.29.7",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -83,7 +83,10 @@ async function handleAuthorizationCodeGrant(
83
83
  if (clientId !== codeData.clientId) {
84
84
  return oauthError("invalid_grant", "client_id mismatch");
85
85
  }
86
- if (redirectUri && redirectUri !== codeData.redirectUri) {
86
+ // RFC 6749 §4.1.3: redirect_uri was part of the authorize request (and
87
+ // is always stored on the code), so it MUST also be supplied here and
88
+ // match exactly. Enforcing this prevents auth-code injection attacks.
89
+ if (!redirectUri || redirectUri !== codeData.redirectUri) {
87
90
  return oauthError("invalid_grant", "redirect_uri mismatch");
88
91
  }
89
92