6.0.0-alpha12
6/8/25

[#13573] Server port missing in selfUrl
Summary Server port missing in selfUrl
Queue Horde Framework Packages
Queue Version FRAMEWORK_5_1
Type Bug
State Resolved
Priority 1. Low
Owners mrubinsk (at) horde (dot) org
Requester Jasper.Olbrich (at) students (dot) uni-marburg (dot) de
Created 09/16/2014 (3918 days ago)
Due
Updated 03/10/2015 (3743 days ago)
Assigned 03/10/2015 (3743 days ago)
Resolved 03/10/2015 (3743 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
03/10/2015 04:06:29 PM Michael Rubinsky State ⇒ Resolved
 
03/10/2015 04:02:46 PM Git Commit Comment #9 Reply to this comment
Changes have been made in Git (master):

commit 644b73b737a0ff4f2044d47304c9b57d328fe8d8
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date:   Tue Mar 10 12:00:00 2015 -0400

     Only clear the port when forcing SSL.

     If using SSL_ONLY_LOGIN, any custom configured port should be taken
     as the HTTP port since HTTPS is only used for login.

     Bug: 13573

  framework/Core/lib/Horde.php |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

http://github.com/horde/horde/commit/644b73b737a0ff4f2044d47304c9b57d328fe8d8
03/10/2015 03:46:56 PM Michael Rubinsky Comment #8
State ⇒ Assigned
Reply to this comment
*sigh*.

The failing test is actually the opposite situation. The custom HTTP 
port is lost. Fixing.
03/10/2015 03:44:23 PM Michael Rubinsky Comment #7
Assigned to Michael Rubinsky
State ⇒ Not A Bug
Reply to this comment
Ignoring the fact that the portal form urls are all relative, selfUrl
works as expected - with the exception that if $conf['use_ssl'] == 3
then the custom port is always ignored. Not quite sure if that's
intended or not....
Probably not, it should be possible to enforce HTTPS while still 
using a different than the non-default port.
Thinking about this, I don't think this makes sense. "3" means only 
use HTTPS during login. If there is a non-standard port configured, it 
makes sense in this context for it to be the HTTP port (since we are 
not using HTTPS except during login). In this case, there really is no 
way to configure a non-standard HTTPS port.

Closing since the existing tests pass and I cannot reproduce the behavior.
03/10/2015 09:27:54 AM Jan Schneider Comment #6 Reply to this comment
Ignoring the fact that the portal form urls are all relative, 
selfUrl works as expected - with the exception that if 
$conf['use_ssl'] == 3 then the custom port is always ignored. Not 
quite sure if that's intended or not....
Probably not, it should be possible to enforce HTTPS while still using 
a different than the non-default port.
02/05/2015 03:06:49 PM Git Commit Comment #5 Reply to this comment
Changes have been made in Git (master):

commit c8bea045ea456518b6710acd6eb20b5446df978c
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date:   Thu Feb 5 10:01:59 2015 -0500

     Add passing tests for Bug: 13573

  framework/Core/test/Horde/Core/UrlTest.php |   20 ++++++++++++++++++++
  1 files changed, 20 insertions(+), 0 deletions(-)

http://github.com/horde/horde/commit/c8bea045ea456518b6710acd6eb20b5446df978c
02/05/2015 03:06:16 PM Michael Rubinsky Comment #4 Reply to this comment
Ignoring the fact that the portal form urls are all relative, selfUrl 
works as expected - with the exception that if $conf['use_ssl'] == 3 
then the custom port is always ignored. Not quite sure if that's 
intended or not....
09/17/2014 12:30:48 PM Jasper (dot) Olbrich (at) students (dot) uni-marburg (dot) de Comment #3 Reply to this comment
The action URLs of those forms aren't even full URLs, just relative URIs.
If I look at the HTML source of services/portal/edit.php, all the 
forms that contain the "Add" button use this URL

<!--a75c305b1c0a6022--><form method="post" 
action="https://example.com/services/portal/edit.php#block">

with missing port. Maybe the reason is somewhere else, but I 
definately see wrong behavior.
09/17/2014 12:00:21 PM Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
The action URLs of those forms aren't even full URLs, just relative URIs.
09/16/2014 11:43:19 AM Jasper (dot) Olbrich (at) students (dot) uni-marburg (dot) de Comment #1
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Queue ⇒ Horde Framework Packages
Summary ⇒ Server port missing in selfUrl
Type ⇒ Bug
Priority ⇒ 1. Low
Reply to this comment
Hello,

I can't edit the portal page if horde is served on an non-standard 
port. The "Add" buttons on services/portal/edit.php all lead to 
https://example.com/services/portal/edit.php#block, even if Horde is 
running fine on https://example.com:1234.
I tried both
$conf['server']['port'] = $_SERVER['SERVER_PORT'];
and
$conf['server']['port'] = 1234;
to no avail. I think the bug is in selfUrl() from Core/lib/Horde.php, 
but I'm unsure how to fix.

Saved Queries