zendesk / zendesk_api_client_php

Official Zendesk API v2 client library for PHP
336 stars 259 forks source link

Backport subdomain validation #477

Closed sanmai closed 4 months ago

sanmai commented 2 years ago

This PR backports subdomain validation from #466, necessary to fix CVE-2021-30492.

I also added/fixed tests. Here's how you can run them:

php vendor/bin/phpunit tests/Zendesk/API/UnitTests/InvalidSubdomainTest.php
php vendor/bin/phpunit tests/Zendesk/API/UnitTests/OrganizationsTest.php

All should be left is to tag a new release, update the Packagist registry, and tweak CVE-2021-30492 to mark this new version as unaffected.

sanmai commented 7 months ago

Please review my comments.

Alternatively, I'll be happy to close this PR as it looks like it is no longer necessary for my cause.