{"id":18055720,"url":"https://github.com/willdurand/jsonpcallbackvalidator","last_synced_at":"2025-04-13T18:33:49.280Z","repository":{"id":11259473,"uuid":"13661330","full_name":"willdurand/JsonpCallbackValidator","owner":"willdurand","description":"JSONP callback validator.","archived":false,"fork":false,"pushed_at":"2023-07-29T16:52:43.000Z","size":18,"stargazers_count":663,"open_issues_count":0,"forks_count":9,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-11T08:40:59.503Z","etag":null,"topics":["jsonp","jsonp-callback","php","validator"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/willdurand.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2013-10-17T21:14:26.000Z","updated_at":"2025-03-26T09:40:56.000Z","dependencies_parsed_at":"2022-08-07T06:01:17.571Z","dependency_job_id":"75998450-62a5-48ea-8bb1-33128fe5d488","html_url":"https://github.com/willdurand/JsonpCallbackValidator","commit_stats":{"total_commits":23,"total_committers":7,"mean_commits":"3.2857142857142856","dds":"0.34782608695652173","last_synced_commit":"52e813d8f7c2e1bedef7bba00040aa49b27c4021"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willdurand%2FJsonpCallbackValidator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willdurand%2FJsonpCallbackValidator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willdurand%2FJsonpCallbackValidator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/willdurand%2FJsonpCallbackValidator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/willdurand","download_url":"https://codeload.github.com/willdurand/JsonpCallbackValidator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248760853,"owners_count":21157442,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jsonp","jsonp-callback","php","validator"],"created_at":"2024-10-31T01:11:41.130Z","updated_at":"2025-04-13T18:33:49.217Z","avatar_url":"https://github.com/willdurand.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JsonpCallbackValidator\n\n[![GitHub Actions](https://github.com/willdurand/JsonpCallbackValidator/workflows/ci/badge.svg)](https://github.com/willdurand/JsonpCallbackValidator/actions?query=workflow%3A%22ci%22+branch%3Amaster)\n[![Total\nDownloads](https://poser.pugx.org/willdurand/jsonp-callback-validator/downloads.png)](https://packagist.org/packages/willdurand/jsonp-callback-validator)\n[![Latest Stable\nVersion](https://poser.pugx.org/willdurand/jsonp-callback-validator/v/stable.png)](https://packagist.org/packages/willdurand/jsonp-callback-validator)\n\n**JsonpCallbackValidator** allows you to **validate a JSONP callback** in order\nto prevent XSS attacks.\n\n## Usage\n\n```php\n$validator = new \\JsonpCallbackValidator();\n\n$validator-\u003evalidate(\"JSONP.callback\");\n// returns `true`\n\n$validator-\u003evalidate(\"(function xss(x){evil()})\");\n// returns `false`\n```\n\nOr as a static method:\n\n```php\n\\JsonpCallbackValidator::validate(\"JSONP.callback\");\n// returns `true`\n\n\\JsonpCallbackValidator::validate(\"(function xss(x){evil()})\");\n// returns `false`\n```\n\n## Installation\n\nThe recommended way to install JsonpCallbackValidator is through\n[Composer](https://getcomposer.org/):\n\n```bash\n$ composer require willdurand/jsonp-callback-validator\n```\n\n## Unit Tests\n\nSetup the test suite using Composer:\n\n    $ composer install\n\nRun it using PHPUnit:\n\n    $ ./vendor/bin/simple-phpunit\n\n## Contributing\n\nSee [CONTRIBUTING](CONTRIBUTING.md) file.\n\n## Credits\n\n- Erik Eng ([@ptz0n](https://github.com/ptz0n)) for [his\n  Gist](https://gist.github.com/ptz0n/1217080)\n\n## License\n\nJsonpCallbackValidator is released under the MIT License. See the bundled\nLICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilldurand%2Fjsonpcallbackvalidator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwilldurand%2Fjsonpcallbackvalidator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilldurand%2Fjsonpcallbackvalidator/lists"}