Skip to content
This repository has been 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 opened this issue Jun 4, 2015 · 2 comments
Labels

Comments

@ppetermann
Copy link

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.

@ppetermann
Copy link
Author

ping

@ArnaudLigny
Copy link

I have (had) the same problem, but with the end of support of PHP 5.5, is no more an issue! o/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants