2017 © Pedro Peláez
 

library binput

Binput Is An Input Protector For Laravel 5

image

graham-campbell/binput

Binput Is An Input Protector For Laravel 5

  • Friday, March 2, 2018
  • by graham-campbell
  • Repository
  • 14 Watchers
  • 112 Stars
  • 166,250 Installations
  • PHP
  • 8 Dependents
  • 1 Suggesters
  • 16 Forks
  • 0 Open issues
  • 32 Versions
  • 5 % Grown

The README.md

Laravel Binput

Laravel Binput was created by, and is maintained by Graham Campbell, and is an input protector for Laravel that prevents potentially dangerous elements like <script> tags in any input you receive, from doing harm. It utilises my Laravel Security package, which cleans the input using voku/anti-xss. Feel free to check out the change log, releases, security policy, license, code of conduct, and contribution guidelines., (*1)

Banner, (*2)

Build Status StyleCI Status Software License Packagist Downloads Latest Version , (*3)

Installation

This version requires PHP 8.0-8.3 and supports Laravel 9-11., (*4)

Binput L5.5 L5.6 L5.7 L5.8 L6 L7 L8 L9 L10 L11
5.1 :white_check_mark: :white_check_mark: :white_check_mark: :x: :x: :x: :x: :x: :x: :x:
6.2 :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :x: :x: :x: :x: :x:
7.1 :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :x: :x: :x: :x:
8.0 :x: :x: :x: :x: :white_check_mark: :white_check_mark: :x: :x: :x: :x:
9.1 :x: :x: :x: :x: :white_check_mark: :white_check_mark: :white_check_mark: :white_check_mark: :x: :x:
10.0 :x: :x: :x: :x: :x: :x: :white_check_mark: :white_check_mark: :x: :x:
11.1 :x: :x: :x: :x: :x: :x: :x: :white_check_mark: :white_check_mark: :white_check_mark:

To get the latest version, simply require the project using Composer:, (*5)

$ composer require "graham-campbell/binput:^11.1"

Once installed, if you are not using automatic package discovery, then you need to register the GrahamCampbell\Security\SecurityServiceProvider and GrahamCampbell\Binput\BinputServiceProvider service providers in your config/app.php., (*6)

You can also optionally alias our facade:, (*7)

        'Binput' => GrahamCampbell\Binput\Facades\Binput::class,

Configuration

Laravel Binput requires no configuration. Just follow the simple install instructions and go!, (*8)

Usage

Binput

This is the class of most interest. It is bound to the ioc container as 'binput' and can be accessed using the Facades\Binput facade. There are a few public methods of interest., (*9)

The 'all', 'get', 'input', 'only', 'except', and 'old' methods have an identical api to the methods found on the laravel request class accept from they all accept two extra parameters at the end. The first extra parameter is a boolean representing if the input should be trimmed. The second extra parameter is a boolean representing if the input should be xss cleaned. Both extra parameters are default to true., (*10)

There are two additional methods added to the public api. The first is a method called 'map' which will remap the output from the 'only' method. The 'map' function requires an associative array as the first parameter. The second method is the 'clean' function. It takes three parameters. The first is the value to be cleaned (it can be an array, and will be recursively iterated over and cleaned), and the final two are trim and clean, which behave in the same way as earlier., (*11)

Any methods not found on this binput class will actually fall back to the laravel request class with a dynamic call function, so every other method on the request class is available in exactly the same way it would be on the Laravel request class., (*12)

Facades\Binput

This facade will dynamically pass static method calls to the 'binput' object in the ioc container which by default is the Binput class., (*13)

BinputServiceProvider

This class contains no public methods of interest. This class should be added to the providers array in config/app.php. This class will setup ioc bindings., (*14)

Real Examples

Here you can see an example of just how simple this package is to use., (*15)

// request input data: ['test' => '123', 'foo' => '    ']

$input = Binput::all(); // ['test' => '123', 'foo' => '']

Security

If you discover a security vulnerability within this package, please send an email to security@tidelift.com. All security vulnerabilities will be promptly addressed. You may view our full security policy here., (*16)

License

Laravel Binput is licensed under The MIT License (MIT)., (*17)

For Enterprise

Available as part of the Tidelift Subscription, (*18)

The maintainers of graham-campbell/binput and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. Learn more., (*19)

The Versions

02/03 2018

dev-master

9999999-dev

Binput Is An Input Protector For Laravel 5

  Sources   Download

MIT

The Requires

 

The Development Requires

by Graham Campbell

laravel framework security input graham campbell grahamcampbell better better input binput laravel binput laravel-binput

02/03 2018

v5.0.0

5.0.0.0

Binput Is An Input Protector For Laravel 5

  Sources   Download

MIT

The Requires

 

The Development Requires

by Graham Campbell

laravel framework security input graham campbell grahamcampbell better better input binput laravel binput laravel-binput

02/01 2018

4.0.x-dev

4.0.9999999.9999999-dev

Binput Is An Input Protector For Laravel 5

  Sources   Download

MIT

The Requires

 

The Development Requires

by Graham Campbell

laravel framework security input graham campbell grahamcampbell better better input binput laravel binput laravel-binput

06/08 2017

v4.0.0

4.0.0.0

Binput Is An Input Protector For Laravel 5

  Sources   Download

MIT

The Requires

 

The Development Requires

by Graham Campbell

laravel framework security input graham campbell grahamcampbell better better input binput laravel binput laravel-binput

01/01 2017

v3.6.0

3.6.0.0

Binput Is An Input Protector For Laravel 5

  Sources   Download

MIT

The Requires

 

The Development Requires

by Graham Campbell

laravel framework security input graham campbell grahamcampbell better better input binput laravel binput laravel-binput

01/01 2017

3.6.x-dev

3.6.9999999.9999999-dev

Binput Is An Input Protector For Laravel 5

  Sources   Download

MIT

The Requires

 

The Development Requires

by Graham Campbell

laravel framework security input graham campbell grahamcampbell better better input binput laravel binput laravel-binput

21/10 2016

v3.5.0

3.5.0.0

Binput Is An Input Protector For Laravel 5

  Sources   Download

MIT

The Requires

 

The Development Requires

by Graham Campbell

laravel framework security input graham campbell grahamcampbell better better input binput laravel binput laravel-binput

26/04 2016

v3.4.0

3.4.0.0

Binput Is An Input Protector For Laravel 5

  Sources   Download

MIT

The Requires

 

The Development Requires

by Graham Campbell

laravel framework security input graham campbell grahamcampbell better better input binput laravel binput laravel-binput

30/01 2016

v3.3.1

3.3.1.0

Binput Is An Input Protector For Laravel 5

  Sources   Download

MIT

The Requires

 

The Development Requires

by Graham Campbell

laravel framework security input graham campbell grahamcampbell better better input binput laravel binput laravel-binput

14/11 2015

v3.3.0

3.3.0.0

Binput Is An Input Protector For Laravel 5

  Sources   Download

MIT

The Requires

 

The Development Requires

by Graham Campbell

laravel framework security input graham campbell grahamcampbell better better input binput laravel binput laravel-binput

06/10 2015

v3.2.1

3.2.1.0

Binput Is An Input Protector For Laravel 5

  Sources   Download

MIT

The Requires

 

The Development Requires

by Graham Campbell

laravel framework security input graham campbell grahamcampbell better better input binput laravel binput laravel-binput

26/06 2015

v3.2.0

3.2.0.0

Binput Is An Input Protector For Laravel 5

  Sources   Download

MIT

The Requires

 

The Development Requires

by Graham Campbell

laravel framework security input graham campbell grahamcampbell better better input binput laravel binput laravel-binput

21/05 2015

v3.1.0

3.1.0.0

Binput Is An Input Protector For Laravel 5

  Sources   Download

MIT

The Requires

 

The Development Requires

by Graham Campbell

laravel framework security input graham campbell grahamcampbell better better input binput laravel binput laravel-binput

05/02 2015

v3.0.0

3.0.0.0

Binput Is An Input Protector For Laravel 5

  Sources   Download

MIT

The Requires

 

The Development Requires

by Graham Campbell

laravel framework security input graham campbell grahamcampbell better better input binput laravel binput laravel-binput

05/01 2015

v2.1.3

2.1.3.0

Binput Is An Input Protector For Laravel 4.1/4.2

  Sources   Download

MIT

The Requires

 

The Development Requires

by Graham Campbell

laravel framework security input graham campbell grahamcampbell better better input binput laravel binput laravel-binput

05/01 2015

2.1.x-dev

2.1.9999999.9999999-dev

Binput Is An Input Protector For Laravel 4.1/4.2

  Sources   Download

MIT

The Requires

 

The Development Requires

by Graham Campbell

laravel framework security input graham campbell grahamcampbell better better input binput laravel binput laravel-binput

05/10 2014

v2.1.2

2.1.2.0

Binput Is An Input Protector For Laravel 4.1/4.2

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Graham Campbell

laravel framework security input graham campbell grahamcampbell better better input binput laravel binput laravel-binput

09/08 2014

v2.1.1

2.1.1.0

Binput Is An Input Protector For Laravel 4.1+

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Graham Campbell

laravel framework security input graham campbell grahamcampbell better better input binput laravel binput laravel-binput

03/08 2014

v2.1.0

2.1.0.0

Binput Is An Input Protector For Laravel 4.1+

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Graham Campbell

laravel framework security input graham campbell grahamcampbell better better input binput laravel binput laravel-binput

21/07 2014

v2.0.0

2.0.0.0

Binput Is An Input Protector For Laravel 4.1+

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Graham Campbell

laravel framework security input graham campbell grahamcampbell better better input binput laravel binput laravel-binput

16/07 2014

v2.0.0-RC1

2.0.0.0-RC1

Binput Is An Input Protector For Laravel 4.1+

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Graham Campbell

laravel framework security input graham campbell grahamcampbell better better input binput laravel binput laravel-binput

21/04 2014

v1.1.0

1.1.0.0

Binput Is An Input Protector For Laravel 4.1

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Graham Campbell

laravel framework input graham campbell grahamcampbell better better input binput laravel binput laravel-binput

21/04 2014

1.1.x-dev

1.1.9999999.9999999-dev

Binput Is An Input Protector For Laravel 4.1

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Graham Campbell

laravel framework input graham campbell grahamcampbell better better input binput laravel binput laravel-binput

16/03 2014

v1.0.2

1.0.2.0

Binput Is An Input Protector For Laravel 4.1

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Graham Campbell

laravel framework input graham campbell grahamcampbell better better input binput laravel binput laravel-binput

21/02 2014

v1.0.1

1.0.1.0

Binput Is An Input Protector For Laravel 4.1

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Graham Campbell

laravel framework input graham campbell grahamcampbell better better input binput laravel binput laravel-binput

12/02 2014

v1.0.0

1.0.0.0

Binput Is An Input Protector For Laravel 4.1

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Graham Campbell

laravel framework input graham campbell grahamcampbell better better input binput laravel binput laravel-binput

09/02 2014

v1.0.0-RC1

1.0.0.0-RC1

Binput Is An Input Protector For Laravel 4.1

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Graham Campbell

laravel framework input graham campbell grahamcampbell better better input binput laravel binput laravel-binput

08/02 2014

v1.0.0-beta2

1.0.0.0-beta2

Binput Is An Input Protector For Laravel 4.1

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Graham Campbell

laravel framework input graham campbell grahamcampbell better better input binput laravel binput laravel-binput

22/01 2014

v1.0.0-beta1

1.0.0.0-beta1

Binput Is An Input Protector For Laravel 4.1

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

by Graham Campbell

laravel framework input graham campbell grahamcampbell better better input binput laravel binput laravel-binput

12/12 2013

v0.3.1-alpha

0.3.1.0-alpha

Binput Is An Input Protector For Laravel 4

  Sources   Download

Apache License 2.0

The Requires

 

The Development Requires

by Graham Campbell

laravel framework input graham campbell grahamcampbell better better input binput laravel binput laravel-binput

25/08 2013

v0.2.0-alpha

0.2.0.0-alpha

Binput Is An Input Protector For Laravel 4

  Sources   Download

MIT

The Requires

 

The Development Requires

by Graham Campbell

laravel framework input graham campbell grahamcampbell better better input binput laravel binput laravel-binput

15/08 2013

v0.1.0-alpha

0.1.0.0-alpha

Binput Is An Input Protector For Laravel 4

  Sources   Download

MIT

The Requires

 

The Development Requires

by Graham Campbell

laravel framework input graham campbell grahamcampbell better better input binput laravel binput laravel-binput