Skip to content

Deprecate empty Signer, empty Key and empty Signature#938

Merged
lcobucci merged 1 commit into
lcobucci:4.3.xfrom
Slamdunk:no_empty_please
Nov 4, 2022
Merged

Deprecate empty Signer, empty Key and empty Signature#938
lcobucci merged 1 commit into
lcobucci:4.3.xfrom
Slamdunk:no_empty_please

Conversation

@Slamdunk

@Slamdunk Slamdunk commented Oct 11, 2022

Copy link
Copy Markdown
Collaborator

Addresses #937 for v4.

This PR deprecates:

  1. \Lcobucci\JWT\Signer\None
  2. \Lcobucci\JWT\Signer\Key\InMemory::empty
  3. \Lcobucci\JWT\Token\Signature::fromEmptyData
  4. and as a result, \Lcobucci\JWT\Configuration::forUnsecuredSigner

The likelyhood of them being misused are too high.

If someone needs them, they can implement it by themself.

@Slamdunk Slamdunk added this to the 4.3.0 milestone Oct 11, 2022
@Slamdunk

Copy link
Copy Markdown
Collaborator Author

BTW, yes I know what https://www.rfc-editor.org/rfc/rfc7519#section-8 says:

Of the signature and MAC algorithms specified in JSON Web Algorithms [JWA], only HMAC SHA-256 ("HS256") and "none" MUST be implemented by conforming JWT implementations.

Screw that

@Ocramius

Copy link
Copy Markdown
Collaborator

That would certainly make @paragonie happy 👍

@lcobucci

lcobucci commented Nov 4, 2022

Copy link
Copy Markdown
Owner

Very well, let's kill this with fire 🔥

@Slamdunk would you be able to start a new section "v4.x to v5.x" on upgrading and mention this? I'll handle it... need to do it on another PR too

@lcobucci lcobucci self-assigned this Nov 4, 2022
@lcobucci
lcobucci merged commit 68caae9 into lcobucci:4.3.x Nov 4, 2022
@Slamdunk
Slamdunk deleted the no_empty_please branch November 4, 2022 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants