Skip to content
This repository was archived by the owner on Mar 15, 2020. It is now read-only.
This repository was archived by the owner on Mar 15, 2020. It is now read-only.

CN_match not working properly in case of redirects in PHP versions < 5.6.0 #4

Open
@ppetermann

Description

@ppetermann

in:
https://github.com/padraic/file_get_contents/blob/master/src/Humbug/FileGetContents.php#L104

the ssl option 'CN_match' is set for PHP versions below 5.6.0,

however when file_get_contents is used, for example to fetch a download from github, and the download url sends a Location redirect header, say to amazon s3, the option will cause it to fail, as the certificate of the url thats redirected to will be matched against the value in this option.

as not doing the check seems not viable option,
a solution would be to prevent file_get_contents from following the redirect, check if a redirect was done, and if so call the function (with the options set for the location redirected to) again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions