6.0.0-git
2019-05-19

[#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 2014-09-16 (1706 days ago)
Due
Updated 2015-03-10 (1531 days ago)
Assigned 2015-03-10 (1531 days ago)
Resolved 2015-03-10 (1531 days ago)
Milestone
Patch No

History
2015-03-10 16:06:29 Michael Rubinsky State ⇒ Resolved
 
2015-03-10 16:02:46 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
2015-03-10 15:46:56 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.
2015-03-10 15:44:23 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.
2015-03-10 09:27:54 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.
2015-02-05 15:06:49 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
2015-02-05 15:06:16 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....
2014-09-17 12:30:48 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

<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.
2014-09-17 12:00:21 Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
The action URLs of those forms aren't even full URLs, just relative URIs.
2014-09-16 11:43:19 Jasper (dot) Olbrich (at) students (dot) uni-marburg (dot) de Comment #1
Type ⇒ Bug
Patch ⇒ No
Milestone ⇒
Queue ⇒ Horde Framework Packages
Summary ⇒ Server port missing in selfUrl
Priority ⇒ 1. Low
State ⇒ Unconfirmed
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