Opened 9 years ago
Closed 9 years ago
#33109 closed defect (bug) (fixed)
attachment_url_to_postid() fails if url protocols don't match
Reported by: | welcher | Owned by: | wonderboymusic |
---|---|---|---|
Milestone: | 4.4 | Priority: | normal |
Severity: | normal | Version: | 4.0 |
Component: | Media | Keywords: | has-patch dev-feedback early 2nd-opinion |
Focuses: | Cc: |
Description
If attachment_url_to_postid()
is passed a url with a protocol that does not match the upload directory url protocol the substr()
call does not remove the appropriate part of the url and the subsquent database lookup does not retrieve the ID correctly and the method returns 0. I discovered this when working with a client site that had an http front end but an https backend.
I have attached the unit tests and fix patches separately so the issue can be seen before applying the fix which resolved the issue.
Attachments (3)
Change History (9)
#1
@
9 years ago
- Summary changed from attachment_url_to_postid() fail if url protocols don't match to attachment_url_to_postid() fails if url protocols don't match
#3
@
9 years ago
- Milestone changed from 4.3 to Future Release
We're a few days away from RC, let's do this in a future release.
Note: See
TracTickets for help on using
tickets.
Unit Tests