All Projects → willdurand → Jsonpcallbackvalidator

willdurand / Jsonpcallbackvalidator

Licence: mit
JSONP callback validator.

Projects that are alternatives of or similar to Jsonpcallbackvalidator

Djv
Dynamic JSON Schema Validator - Supports draft-04/06
Stars: ✭ 281 (-52.77%)
Mutual labels:  validator
Formily
Alibaba Group Unified Form Solution -- Support React/ReactNative/Vue2/Vue3
Stars: ✭ 6,554 (+1001.51%)
Mutual labels:  validator
Input Mask Ios
User input masking library repo.
Stars: ✭ 494 (-16.97%)
Mutual labels:  validator
Deepkit Framework
A new full-featured and high-performance web framework for sophisticated Typescript projects like complex admin interfaces, websites, games, desktop and mobile apps.
Stars: ✭ 307 (-48.4%)
Mutual labels:  validator
Validator.js
String validation
Stars: ✭ 18,842 (+3066.72%)
Mutual labels:  validator
Graphql Constraint Directive
Validate GraphQL fields
Stars: ✭ 401 (-32.61%)
Mutual labels:  validator
Telephone number
Phone number validation for Ruby
Stars: ✭ 262 (-55.97%)
Mutual labels:  validator
Gf
GoFrame is a modular, powerful, high-performance and enterprise-class application development framework of Golang.
Stars: ✭ 6,501 (+992.61%)
Mutual labels:  validator
Approvejs
A simple JavaScript validation library that doesn't interfere
Stars: ✭ 336 (-43.53%)
Mutual labels:  validator
Validator.js
⁉️轻量级的 JavaScript 表单验证,字符串验证。没有依赖,支持 UMD ,~3kb。
Stars: ✭ 486 (-18.32%)
Mutual labels:  validator
Gerador Validador Cpf
Biblioteca JS open-source para gerar e validar CPF.
Stars: ✭ 312 (-47.56%)
Mutual labels:  validator
Vue Music
Music Player for Vue.js
Stars: ✭ 324 (-45.55%)
Mutual labels:  jsonp
Indicative
Indicative is a simple yet powerful data validator for Node.js and browsers. It makes it so simple to write async validations on nested set of data.
Stars: ✭ 412 (-30.76%)
Mutual labels:  validator
Validate
A simple jQuery plugin to validate forms.
Stars: ✭ 298 (-49.92%)
Mutual labels:  validator
Oas Kit
Convert Swagger 2.0 definitions to OpenAPI 3.0 and resolve/validate/lint
Stars: ✭ 516 (-13.28%)
Mutual labels:  validator
Reqwest
browser asynchronous http requests
Stars: ✭ 2,918 (+390.42%)
Mutual labels:  jsonp
Validate
⚔ Go package for data validation and filtering. support Map, Struct, Form data. Go通用的数据验证与过滤库,使用简单,内置大部分常用验证、过滤器,支持自定义验证器、自定义消息、字段翻译。
Stars: ✭ 378 (-36.47%)
Mutual labels:  validator
Nice Validator
Simple, smart and pleasant validation solution.
Stars: ✭ 587 (-1.34%)
Mutual labels:  validator
Express Validator
An express.js middleware for validator.js.
Stars: ✭ 5,236 (+780%)
Mutual labels:  validator
Cross Origin
🌀 跨域demo。CORS、JSONP、postMessage、websocket、document.domain、window.name、iframe等示例
Stars: ✭ 475 (-20.17%)
Mutual labels:  jsonp

JsonpCallbackValidator

Build Status Total Downloads Latest Stable Version

JsonpCallbackValidator 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`

Installation

The recommended way to install JsonpCallbackValidator is through Composer:

$ composer require willdurand/jsonp-callback-validator

Unit Tests

Setup the test suite using Composer:

$ composer install

Run it using PHPUnit:

$ ./vendor/bin/phpunit

Contributing

See CONTRIBUTING file.

Credits

License

JsonpCallbackValidator is released under the MIT License. See the bundled LICENSE file for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].