fix: remove code potentially generating invalid cookies

This commit is contained in:
Björn Fromme
2024-08-21 14:30:37 +02:00
parent 2c59b78b45
commit a79f844e53
@@ -35,8 +35,7 @@ class BookingUrlUtility
{
const COOKIE_NAME = 'ep_trk';
const COOKIE_NAME_BPN = 'bpn_cookie';
const URL_BASE = 'https://bpn.ep-reisen.de/buspronet/maske_buchung.php';
const URL_BASE = 'https://www.ep-reisen.de/buchung/maske_buchung.php';
public static function generateUrl(array $options): string
{
@@ -60,7 +59,6 @@ class BookingUrlUtility
$query = static::buildQuery($bookingId, $hotelId, $dateEnd, $template, $isDayTrip);
$epCookie = CookieUtility::getPaCookie();
$bpnCookie = CookieUtility::getBpnCookie();
if (isset($_COOKIE[static::COOKIE_NAME])) {
if (!preg_match('/^([a-z]{4}|PA)\d{3,4}$/', $_COOKIE[static::COOKIE_NAME])) {
@@ -73,8 +71,6 @@ class BookingUrlUtility
if (null !== $paCode) {
$query['agenturcode'] = $paCode;
} elseif ($bpnCookie) {
$query['agenturcode'] = $bpnCookie;
} elseif ($epCookie) {
$queryParameter = CookieUtility::getQueryParameter($epCookie);
$query[$queryParameter] = $epCookie;