Fixes #6963 -- Escape cache keys for Now Playing so special characters don't cause problems.
This commit is contained in:
parent
b83d54bf50
commit
2e169b9499
|
@ -157,7 +157,9 @@ final class NowPlayingCache
|
|||
}
|
||||
|
||||
return $this->cache->getItem(
|
||||
'now_playing.station_' . $identifier
|
||||
urlencode(
|
||||
'now_playing.station_' . $identifier
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -106,7 +106,7 @@ final class SingleTaskCommand extends AbstractSyncCommand
|
|||
*/
|
||||
public static function getCacheKey(string $taskClass): string
|
||||
{
|
||||
return 'sync_last_run.' . self::getClassShortName($taskClass);
|
||||
return urlencode('sync_last_run.' . self::getClassShortName($taskClass));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -65,7 +65,11 @@ final class ListAction extends AbstractSearchableListAction
|
|||
private function getPlaylists(
|
||||
Station $station
|
||||
): array {
|
||||
$item = $this->psr6Cache->getItem('station_' . $station->getIdRequired() . '_on_demand_playlists');
|
||||
$item = $this->psr6Cache->getItem(
|
||||
urlencode(
|
||||
'station_' . $station->getIdRequired() . '_on_demand_playlists'
|
||||
)
|
||||
);
|
||||
|
||||
if (!$item->isHit()) {
|
||||
$playlistIds = $this->em->createQuery(
|
||||
|
|
|
@ -81,7 +81,7 @@ final class ScheduleAction implements SingleActionInterface
|
|||
. $dateRange->getStart()->format('Ymd') . '-'
|
||||
. $dateRange->getEnd()->format('Ymd');
|
||||
|
||||
$cacheItem = $this->psr6Cache->getItem($cacheKey);
|
||||
$cacheItem = $this->psr6Cache->getItem(urlencode($cacheKey));
|
||||
|
||||
if (!$cacheItem->isHit()) {
|
||||
$nowTz = CarbonImmutable::now($station->getTimezoneObject());
|
||||
|
@ -113,7 +113,7 @@ final class ScheduleAction implements SingleActionInterface
|
|||
$cacheKey = 'api_station_' . $station->getId() . '_schedule_upcoming';
|
||||
}
|
||||
|
||||
$cacheItem = $this->psr6Cache->getItem($cacheKey);
|
||||
$cacheItem = $this->psr6Cache->getItem(urlencode($cacheKey));
|
||||
|
||||
if (!$cacheItem->isHit()) {
|
||||
$cacheItem->set($this->scheduleRepo->getUpcomingSchedule($station, $now));
|
||||
|
|
Loading…
Reference in New Issue