Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set verify_SSL=>1 for default HTTP::Tiny user agent #113

Merged
merged 1 commit into from Aug 22, 2022

Conversation

stigtsp
Copy link
Contributor

@stigtsp stigtsp commented Aug 21, 2022

HTTP::Tiny doesn't verify TLS/SSL certificates by default. This PR sets that flag for the default user agent to make sure we connect to legitimate API endpoints.

Example: MetaCPAN::Client will perform a request (that returns 404 Not Found) against https://wrong.host.badssl.com:

$ perl -Ilib -MMetaCPAN::Client -E 'my $m = MetaCPAN::Client->new(domain=>"https://wrong.host.badssl.com");say $m->release("MetaCPAN-Client")->name;'
Failed to fetch 'https://wrong.host.badssl.com/release/MetaCPAN-Client': Not Found at lib/MetaCPAN/Client.pm line 288.

@mickeyn mickeyn merged commit d10dbbf into metacpan:master Aug 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants