Opened 14 years ago
Closed 8 years ago
#16167 closed defect (bug) (wontfix)
FORCE_ADMIN_SSL broken if site runs on port different from 80
Reported by: | yoush | Owned by: | johnbillion |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.6 |
Component: | Bootstrap/Load | Keywords: | has-patch needs-unit-tests needs-testing needs-refresh https |
Focuses: | Cc: |
Description
I'm running a wordpress site (http://yoush.homelinux.org:8079/) hosted at my home server. Unfortunately mu ISP blocks incoming connections on port 80, so I have to use non-standard port.
With unmodified wordpress 3.0.4, I was unable to use FORCE_ADMIN_SSL, because it caused URLs starting with
http://yoush.homelinux.org:8079/
to be converted to
https://yoush.homelinux.org:8079/
Which is definitly broken since it is impossible to serve both http and https on the same port.
To fix this, I propose removing ':port' from URL when converting http url to https.
I've created a patch for this, that seems to work for me on my site.
Attachments (2)
Change History (12)
#1
@
14 years ago
- Keywords needs-patch added
- Milestone changed from Awaiting Review to Future Release
Another idea would be to create two new constants WP_PORT_HTTP and WP_PORT_HTTPS or something and append them to the domain during that redirect (if they're not 80, 443 respectively).
Speaking as a former I-host-my-blog-on-a-non-standard-port WordPress user myself, I can sympathize :)
#3
@
13 years ago
- Cc kpayne@… added
To use this 16167.patch, create new constants in your wp-config.php
file like so:
define('WP_HTTP_PORT', 81); define('WP_HTTPS_PORT', 444);
Then you should be able to login / admin on over SSL on port 444, but browse content over port 81. There's two new functions for themes / plugins, too, to convert between URLs between http / https:
make_https($url); make_http($url);
#6
@
9 years ago
- Keywords needs-unit-tests needs-testing added; needs-refresh removed
- Milestone changed from Future Release to Awaiting Review
- Owner set to johnbillion
- Status changed from new to reviewing
- Version changed from 3.0.4 to 2.6
This ticket was mentioned in Slack in #core-http by johnbillion. View the logs.
8 years ago
#10
@
8 years ago
- Keywords changed from has-patch, needs-unit-tests, needs-testing, needs-refresh, https to has-patch needs-unit-tests needs-testing needs-refresh https
- Milestone Awaiting Review deleted
- Resolution set to wontfix
- Status changed from reviewing to closed
This ticket doesn't have much chance of going anywhere because of the rare configuration, so I'm closing it as wontfix. Unfortunately, core can't handle every possible configuration of hosts, ports, and schemes, and this is one such configuration that isn't going to get much love.
The recommendation here is to use the home_url
and admin_url
filters as necessary to correct the port and scheme as appropriate for your site.
Patch that fixes this issue for me