Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 1, 2024 via composer

willdurand/jsonp-callback-validator v2.0.0

JSONP callback validator.
Package summary
Share
0
issues
1
license
1
MIT
Package created
17 Oct 2013
Version published
30 Jan 2022
Maintainers
1
Total deps
1
Direct deps
0
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
willdurand/jsonp-callback-validator@v2.0.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of willdurand/jsonp-callback-validator 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does willdurand/jsonp-callback-validator do?

The willdurand/jsonp-callback-validator is a powerful tool designed to validate JSONP callbacks in order to enhance the security of your application by preventing Cross-Site Scripting (XSS) attacks. The tool was created by willdurand and can be easily integrated into any PHP project, contributing to the overall safety and reliability of web applications.

How do you use willdurand/jsonp-callback-validator?

Utilizing the willdurand/jsonp-callback-validator is straightforward and can significantly enhance your web application's security. Validating a JSONP callback only requires a few lines of code with this package. Here are some usage examples:

To use as an object:

$validator = new \JsonpCallbackValidator();

$validator->validate("JSONP.callback"); // returns `true`

$validator->validate("(function xss(x){evil()})"); // returns `false`

You can also use it as a static method:

\JsonpCallbackValidator::validate("JSONP.callback"); // returns `true`

\JsonpCallbackValidator::validate("(function xss(x){evil()})"); // returns `false`

Remember, a valid callback returns true while an invalid callback (one that could lead to XSS attacks) returns false.

Before using the validator, don't forget to install it in your project.

It can be easily installed via composer:

$ composer require willdurand/jsonp-callback-validator

Where are the willdurand/jsonp-callback-validator docs?

The comprehensive documentation for willdurand/jsonp-callback-validator is available on its GitHub repository, where you'll find instructions on how to use and install the package, conduct unit tests, and contribute to its development. To get to the docs, simply navigate to https://github.com/willdurand/JsonpCallbackValidator.

All Versions