Skip to content
Snippets Groups Projects
Commit a13c66ae authored by Torben Hansen's avatar Torben Hansen Committed by Christian Kuhn
Browse files

[TASK] Throw LogicException in HashService when required parameter is empty

The `hmac` function in the `HashService` class should not throw a
custom `EmptyAdditionalSecretException` when the `$additionalSecret`
parameter is an empty string. Instead, a top level exception should
be used, as the issue is caused from incorrect parameter usage by
the  developer.

This change replaces the `EmptyAdditionalSecretException` with a
`LogicException` to better indicate the misuse of the method's
parameters.

Resolves: #103277
Releases: main
Change-Id: Ib6b049ee9c233868684af58ebd0e018bc97ef167
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/83206


Tested-by: default avatarcore-ci <typo3@b13.com>
Reviewed-by: default avatarOliver Klee <typo3-coding@oliverklee.de>
Tested-by: default avatarOliver Klee <typo3-coding@oliverklee.de>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
parent ea23f781
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment