feat: integrate remarks with XSS cleaning

This commit is contained in:
Björn Fromme
2025-01-08 17:26:13 +01:00
parent 6c68c598b1
commit b5eeeda3fa
4 changed files with 272 additions and 2 deletions
@@ -11,6 +11,7 @@ use App\BusProNet\Model\Room;
use App\BusProNet\Model\Service;
use App\BusProNet\Model\Surcharge;
use App\BusProNet\TypeConversionTrait;
use voku\helper\AntiXSS;
class BookingResponseParser
{
@@ -118,6 +119,12 @@ class BookingResponseParser
$personalData->communication = $communication;
}
if ($xml->bemerkung) {
$antiXss = new AntiXSS();
$remarks = $antiXss->xss_clean((string) $xml->bemerkung);
$personalData->remarks = $remarks;
}
return $personalData;
}
+2
View File
@@ -23,6 +23,7 @@ class PersonalData
public ?string $shoeSize = null;
public ?string $weight = null;
public ?\DateTimeImmutable $dateOfBirth = null;
public ?string $remarks = null;
#[Assert\Valid()]
public ?Address $address = null;
@@ -52,6 +53,7 @@ class PersonalData
'sonstiges1' => $this->height,
'sonstiges2' => $this->weight,
'sonstiges3' => $this->shoeSize,
'bemerkung' => $this->remarks,
];
}
}