WordPress / WordPress/Requests

Fail with revoked certificate.

Open
#268 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Component: Core
Dominant language
PHP
Stars
3.6k
Forks
500
Avg merge
2d 21h
Merged PRs (30d)
5

Description

Don't get SSL error with revoked certificate

Test:

    try {
        $request = Requests::get('https://revoked.badssl.com/', array());
        echo $request->url.PHP_EOL;
        echo "\tSSL OK HTTP Status code: ".$request->status_code.' '.PHP_EOL;
    }
    catch (Requests_Exception $e) {
        echo curl_getinfo($e->getData(), CURLINFO_EFFECTIVE_URL).PHP_EOL;
        echo "\tSSL Error: ".$e->getType().' '.curl_error($e->getData()).PHP_EOL;
    }

Result:

SSL OK HTTP Status code: 200

Expected:

SSL error revoked certificate

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect the request path used by Requests::get and its TLS certificate verification handling, then reproduce the problem against revoked.badssl.com with the supplied PHP snippet. Done means the request fails with an SSL-related Requests_Exception instead of returning HTTP 200.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
networking, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.