Skip to content

Correct the copy for dict_object#284

Merged
AlexandrosMor merged 2 commits into
mainfrom
hmac_notification_copy
Dec 21, 2023
Merged

Correct the copy for dict_object#284
AlexandrosMor merged 2 commits into
mainfrom
hmac_notification_copy

Conversation

@AlexandrosMor

Copy link
Copy Markdown
Contributor

Description

To avoid this the additionalData remove for the original object create a deep copy (copying nested objects ).
This way, the function is_valid_hmac_notification won't affect the original dict_object due to the use of copy.deepcopy() creating a independent copy of the object

Tested scenarios
add unit test

Fixed issue:
fixes: #278

@AlexandrosMor AlexandrosMor requested a review from a team December 20, 2023 20:41
wboereboom
wboereboom previously approved these changes Dec 21, 2023
Comment thread Adyen/util.py Outdated
@AlexandrosMor AlexandrosMor merged commit 0285102 into main Dec 21, 2023
@AlexandrosMor AlexandrosMor deleted the hmac_notification_copy branch December 21, 2023 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

is_valid_hmac_notification mutates passed webhook data

3 participants