zitadel/internal/crypto
Tim Möhlmann ad9422a7d0
fix(crypto): check for nil client secret (#7729)
When creating an app without secret or other type of authentication method,
like JWT, and the authentication type is switched afterwards the app would remain without generated secret.
If then client authentication with secret is attempted, for example on the token endpoint, the handler would panic in the crypto.CompareHash function on the nile pointer to the CryptoValue.

This fix introduces a nil pointer check in crypt.CompareHash and returns a error.

The issue was reported over discord: https://discord.com/channels/927474939156643850/1222971118730875020
Possible fix was suggested here: https://github.com/zitadel/zitadel/pull/6999#discussion_r1553503088
This bug only applies to zitadel versions <=2.49.1.
2024-04-09 08:44:52 +02:00
..
database chore: use pgx v5 (#7577) 2024-03-27 15:48:22 +02:00
file chore(v2): move to new org (#3499) 2022-04-26 23:01:45 +00:00
aes_test.go add multi files config test and some more 2020-03-30 11:44:17 +02:00
aes.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
bcrypt.go improve some functions 2020-03-30 09:28:00 +02:00
code_mock.go chore(Makefile): add go generate target (#6944) 2023-11-22 10:56:43 +00:00
code_mocker.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
code_test.go chore(Makefile): add go generate target (#6944) 2023-11-22 10:56:43 +00:00
code.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
crypto_mock.go chore(Makefile): add go generate target (#6944) 2023-11-22 10:56:43 +00:00
crypto_test.go fix(crypto): check for nil client secret (#7729) 2024-04-09 08:44:52 +02:00
crypto.go fix(crypto): check for nil client secret (#7729) 2024-04-09 08:44:52 +02:00
generate.go refactor crypto tests 2020-03-30 11:26:02 +02:00
key_storage.go fix(db): always use begin tx (#7142) 2024-01-04 16:12:20 +00:00
key.go refactor: rename package errors to zerrors (#7039) 2023-12-08 15:30:55 +01:00
passwap_test.go fix(crypto): allow parsing of cost int from env string (#7061) 2023-12-15 11:16:05 +00:00
passwap.go fix(crypto): allow parsing of cost int from env string (#7061) 2023-12-15 11:16:05 +00:00
rsa.go feat(saml): implementation of saml for ZITADEL v2 (#3618) 2022-09-12 18:18:08 +02:00