[Backport] Use constant time string comparison in FormKey validator#17108
Conversation
|
Hi @gelanivishal. Thanks for the contribution. We can't make backport of @api annotation to Magento 2.1 version because we can't have API annotation with intervals. After API annotation was declared all next versions should have the declared annotation, but in the current case, Magento 2.1 version will contain the annotation but Magento 2.2.0 will not. |
|
@VladimirZaets I have removed API annotation and let me know anything you want to change. Thank you. |
|
@VladimirZaets Have you checked requested changes? |
|
Hi @sidolov, thank you for the review. |
|
Hi @gelanivishal. Thank you for your contribution. |
Original Pull Request
#13509
Description
CSRF tokens should be considered sensitive strings. While the risk of a malicious actor attempting gleam the form key via a timing attack is very low, we should still follow best practices in verifying this token.
Contribution checklist