在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:willdurand/JsonpCallbackValidator开源软件地址:https://github.com/willdurand/JsonpCallbackValidator开源编程语言:PHP 100.0%开源软件介绍:JsonpCallbackValidatorJsonpCallbackValidator allows you to validate a JSONP callback in order to prevent XSS attacks. Usage$validator = new \JsonpCallbackValidator();
$validator->validate("JSONP.callback");
// returns `true`
$validator->validate("(function xss(x){evil()})");
// returns `false` Or as a static method: \JsonpCallbackValidator::validate("JSONP.callback");
// returns `true`
\JsonpCallbackValidator::validate("(function xss(x){evil()})");
// returns `false` InstallationThe recommended way to install JsonpCallbackValidator is through Composer: $ composer require willdurand/jsonp-callback-validator Unit TestsSetup the test suite using Composer:
Run it using PHPUnit:
ContributingSee CONTRIBUTING file. CreditsLicenseJsonpCallbackValidator is released under the MIT License. See the bundled LICENSE file for details. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论