shweshi / OpenGraph

A Laravel package to fetch Open Graph data of a website.
https://opengraph.shashi.dev
MIT License
157 stars 29 forks source link

Bug Fix: SSL get headers image verification #84

Closed ItsSkynet closed 2 years ago

ItsSkynet commented 2 years ago

Fixes a bug related to Issue #83 on main repository where after verifying the problem it was determined that SSL marked as Wildcard ( * ) can cause problems with "get_headers" function in php.

It was assumed previously that "FILTER_VALIDATE_URL" was being too strict, but later determined that SSL verification was failing.

shweshi commented 2 years ago

@ItsSkynet Thanks for going deeper into the issue and finding the root cause. Is it possible to add a test case for the same? PR looks okay to me.

ItsSkynet commented 2 years ago

of course, at the moment of writing i have found a flaw in the way i approached this and i'm changing it now so that prevents changing of defaults set. i will update this pull request once i'm done changing it.

ItsSkynet commented 2 years ago

i attach here a sandbox test of before and after the change using the before explained issue with twitter images not being read by get_headers

https://onlinephp.io/c/4f736

shweshi commented 2 years ago

@ItsSkynet is the PR ready to merge?

ItsSkynet commented 2 years ago

@ItsSkynet is the PR ready to merge?

yes, its ready.

shweshi commented 2 years ago

@ItsSkynet Thanks for your contribution. PR is merged and fix is released with new version. https://github.com/shweshi/OpenGraph/releases/tag/V1.1.2