2017 © Pedro Peláez
 

library serializer

Safe serialization

image

nokitakaze/serializer

Safe serialization

  • Wednesday, February 14, 2018
  • by nokitakaze
  • Repository
  • 1 Watchers
  • 0 Stars
  • 79 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Safe (un-)serialization of any data

Remote code execution via PHP unserialize. Official documentation says, (*1)

DO NOT pass untrusted user input to unserialize() regardless of the options value of allowed_classes. Unserialization can result in code being loaded and executed due to object instantiation and autoloading, and a malicious user may be able to exploit this, (*2)

But JSON does not implement data as PHP does. I.e. JSON does not support [1=>2,3=>4,"a"=>5,"and"=>"so"]., (*3)

Current status

General

Build Status Scrutinizer Code Quality Code Coverage , (*4)

Usage

At first, (*5)

composer require nokitakaze/serializer

And then, (*6)

require_once 'vendor/autoload.php';
$text = NokitaKaze\Serializer\Serializer::serialize($data);
$data = NokitaKaze\Serializer\Serializer::unserialize($text, $is_valid);

The Versions

14/02 2018

dev-master

9999999-dev

Safe serialization

  Sources   Download

Apache-2.0

The Requires

  • php ^5.6 | ^7.0.9
  • ext-json *

 

The Development Requires

serialization binary serialization

14/02 2018

v0.1.1

0.1.1.0

Safe serialization

  Sources   Download

Apache-2.0

The Requires

  • php ^5.6 | ^7.0.9
  • ext-json *

 

The Development Requires

serialization binary serialization

14/02 2018

dev-developer

dev-developer

Safe serialization

  Sources   Download

Apache-2.0

The Requires

  • php ^5.6 | ^7.0.9
  • ext-json *

 

The Development Requires

serialization binary serialization