mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
feat(webhooks): Add \SensitiveValue attribute to authData parameter in all classes
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
c940ba015c
commit
6e38b48534
3 changed files with 8 additions and 1 deletions
|
|
@ -98,6 +98,7 @@ class WebhooksController extends OCSController {
|
|||
?array $eventFilter,
|
||||
?array $headers,
|
||||
?string $authMethod,
|
||||
#[\SensitiveParameter]
|
||||
?array $authData,
|
||||
): DataResponse {
|
||||
$appId = null;
|
||||
|
|
@ -157,6 +158,7 @@ class WebhooksController extends OCSController {
|
|||
?array $eventFilter,
|
||||
?array $headers,
|
||||
?string $authMethod,
|
||||
#[\SensitiveParameter]
|
||||
?array $authData,
|
||||
): DataResponse {
|
||||
$appId = null;
|
||||
|
|
|
|||
|
|
@ -76,7 +76,10 @@ class WebhookListener extends Entity implements \JsonSerializable {
|
|||
return json_decode($this->crypto->decrypt($this->getAuthData()), associative:true, flags:JSON_THROW_ON_ERROR);
|
||||
}
|
||||
|
||||
public function setAuthDataClear(?array $data): void {
|
||||
public function setAuthDataClear(
|
||||
#[\SensitiveParameter]
|
||||
?array $data
|
||||
): void {
|
||||
if ($data === null) {
|
||||
if ($this->getAuthMethodEnum() === AuthMethod::Header) {
|
||||
throw new \UnexpectedValueException('Header auth method needs an associative array of headers as auth data');
|
||||
|
|
|
|||
|
|
@ -79,6 +79,7 @@ class WebhookListenerMapper extends QBMapper {
|
|||
?array $eventFilter,
|
||||
?array $headers,
|
||||
AuthMethod $authMethod,
|
||||
#[\SensitiveParameter]
|
||||
?array $authData,
|
||||
): WebhookListener {
|
||||
/* Remove any superfluous antislash */
|
||||
|
|
@ -116,6 +117,7 @@ class WebhookListenerMapper extends QBMapper {
|
|||
?array $eventFilter,
|
||||
?array $headers,
|
||||
AuthMethod $authMethod,
|
||||
#[\SensitiveParameter]
|
||||
?array $authData,
|
||||
): WebhookListener {
|
||||
/* Remove any superfluous antislash */
|
||||
|
|
|
|||
Loading…
Reference in a new issue