Opened 11 years ago
Closed 11 years ago
#34144 closed defect (bug) (fixed)
`url_to_postid` doesn't recognize URLs with wrong scheme
| Reported by: | swissspidy | Owned by: | wonderboymusic |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.4 |
| Component: | Rewrite Rules | Version: | 1.0 |
| Severity: | normal | Keywords: | has-patch has-unit-tests |
| Cc: | Focuses: |
Description
While working on the oEmbed feature plugin I noticed that url_to_postid doesn't recognize URLs with the wrong URL scheme.
When your site runs HTTPS and you pass a permalink with http://, you won't get the post ID. The same goes when you provide a https:// URL and is_ssl() is false.
A simple set_url_scheme( $url ) fixes this. Patch attached.
Attachments (1)
Change History (5)
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Previously: #33109