mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-24 02:13:15 +00:00
@@ -1275,7 +1275,7 @@ class V1Controller extends Controller
|
|||||||
'dc:title' => $format($caption, \databox_Field_DCESAbstract::Title),
|
'dc:title' => $format($caption, \databox_Field_DCESAbstract::Title),
|
||||||
'dc:type' => $format($caption, \databox_Field_DCESAbstract::Type),
|
'dc:type' => $format($caption, \databox_Field_DCESAbstract::Type),
|
||||||
],
|
],
|
||||||
'records' => $this->listRecords($request, $story->getChildren()->get_elements()),
|
'records' => $this->listRecords($request, array_values($story->getChildren()->get_elements())),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This file is part of Phraseanet
|
* This file is part of Phraseanet
|
||||||
*
|
*
|
||||||
@@ -12,16 +11,16 @@
|
|||||||
namespace Alchemy\Phrasea\Core\Event\Subscriber;
|
namespace Alchemy\Phrasea\Core\Event\Subscriber;
|
||||||
|
|
||||||
use Alchemy\Phrasea\Application;
|
use Alchemy\Phrasea\Application;
|
||||||
|
use Symfony\Component\HttpFoundation\Cookie;
|
||||||
use Symfony\Component\HttpKernel\KernelEvents;
|
use Symfony\Component\HttpKernel\KernelEvents;
|
||||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||||
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
|
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
|
||||||
use Symfony\Component\HttpKernel\HttpKernelInterface;
|
use Symfony\Component\HttpKernel\HttpKernelInterface;
|
||||||
use Symfony\Component\HttpFoundation\ResponseHeaderBag;
|
|
||||||
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
|
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
|
||||||
|
|
||||||
class CookiesDisablerSubscriber implements EventSubscriberInterface
|
class CookiesDisablerSubscriber implements EventSubscriberInterface
|
||||||
{
|
{
|
||||||
private static $NOSESSION_ROUTES = '/^((\/api\/v1)|(\/api\/?$)|(\/permalink))/';
|
private static $NOSESSION_ROUTES = '/^((\/api\/v\d+)|(\/api\/?$)|(\/permalink))/';
|
||||||
private $app;
|
private $app;
|
||||||
private $sessionCookieEnabled = true;
|
private $sessionCookieEnabled = true;
|
||||||
|
|
||||||
@@ -58,12 +57,9 @@ class CookiesDisablerSubscriber implements EventSubscriberInterface
|
|||||||
|
|
||||||
$response = $event->getResponse();
|
$response = $event->getResponse();
|
||||||
|
|
||||||
foreach ($response->headers->getCookies(ResponseHeaderBag::COOKIES_ARRAY) as $cookie_domains) {
|
/** @var Cookie $cookie */
|
||||||
foreach ($cookie_domains as $cookie_paths) {
|
foreach ($response->headers->getCookies() as $cookie) {
|
||||||
foreach ($cookie_paths as $cookie) {
|
$response->headers->removeCookie($cookie->getName(), $cookie->getPath(), $cookie->getDomain());
|
||||||
$response->headers->removeCookie($cookie->getName(), $cookie->getPath(), $cookie->getDomain());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ class SessionManagerSubscriber implements EventSubscriberInterface
|
|||||||
$request = $event->getRequest();
|
$request = $event->getRequest();
|
||||||
|
|
||||||
if ($request->request->has('oauth_token')
|
if ($request->request->has('oauth_token')
|
||||||
|
|| $request->query->has('oauth_token')
|
||||||
|| $request->query->has('LOG')
|
|| $request->query->has('LOG')
|
||||||
|| null === $moduleId = $this->getModuleId($request->getPathInfo())
|
|| null === $moduleId = $this->getModuleId($request->getPathInfo())
|
||||||
) {
|
) {
|
||||||
|
|||||||
Reference in New Issue
Block a user