Skip to content

Commit 713485e

Browse files
committed
ACP2E-3501: VAPT: Business Logic Error - future date as customer date of birth
1 parent 00aaa80 commit 713485e

File tree

1 file changed

+3
-0
lines changed
  • app/code/Magento/Customer/Model/Validator

1 file changed

+3
-0
lines changed

app/code/Magento/Customer/Model/Validator/Dob.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ public function isValid($customer): bool
6060
*/
6161
private function isValidDob(?string $dobValue, null|string|bool|int|StoreInterface $storeId): bool
6262
{
63+
if ($dobValue != null) {
64+
6365
// Get the timezone of the store
6466
$store = $this->storeManager->getStore($storeId);
6567
$timezone = $store->getConfig('general/locale/timezone');
@@ -76,6 +78,7 @@ private function isValidDob(?string $dobValue, null|string|bool|int|StoreInterfa
7678
if ($dobTimestamp > $currentTimestamp) {
7779
return false;
7880
}
81+
}
7982

8083
return true;
8184
}

0 commit comments

Comments
 (0)