6.0.0-alpha10
5/21/25

[#8515] Switching http protocols during session breaks URL generation.
Summary Switching http protocols during session breaks URL generation.
Queue Horde Framework Packages
Queue Version FRAMEWORK_3
Type Bug
State Resolved
Priority 1. Low
Owners Horde Developers (at)
Requester mrubinsk (at) horde (dot) org
Created 08/21/2009 (5752 days ago)
Due
Updated 09/02/2009 (5740 days ago)
Assigned
Resolved 09/02/2009 (5740 days ago)
Milestone
Patch No

History
09/02/2009 03:14:55 AM Michael Slusarz State ⇒ Resolved
 
09/02/2009 03:14:41 AM CVS Commit Comment #8 Reply to this comment
09/02/2009 03:14:10 AM CVS Commit Comment #7 Reply to this comment
08/21/2009 02:33:08 PM Jan Schneider Comment #6 Reply to this comment
Makes sense to me. This should also simplify the url building in 
Horde:: a lot, because we only have to tackle the port if it is set in 
the configuration.
08/21/2009 02:00:24 PM Michael Rubinsky Comment #5 Reply to this comment
Well, that was easy :)



Setting the default value to an empty string seems to fix things...so 
I guess we should change that to the default?
08/21/2009 01:46:39 PM Jan Schneider Comment #4 Reply to this comment
How about simply leaving the default empty?
08/21/2009 01:39:02 PM Michael Rubinsky Comment #3 Reply to this comment
I had always assumed this was by design (not being able to do this) 
due to my own experience with it. While helping someone in IRC, 
however, I had told them it was not possible to switch mid-session and 
was told by Chuck that it should be possible unless secure cookies 
were enabled. Once I knew it *should* be possible, I was able to track 
down what was causing the weird behavior.



This also bites me *all* the time when I have a Horde window open (I 
always use https, but do not force it) to upload images, or author a 
blog entry, then try to view my horde-driven website, or any other 
page with horde-generated embedded content. The links are always 
broken because they contain the wrong port number for the protocol 
being used.
08/21/2009 07:30:28 AM Jan Schneider Comment #2 Reply to this comment
Why would you want to switch protocols anyway? There is one place 
where we already do this, so it's possible: you can use HTTPS for 
login only.
08/21/2009 12:57:33 AM Michael Rubinsky Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Switching http protocols during session breaks URL generation.
Queue ⇒ Horde Framework Packages
Assigned to Horde DevelopersHorde Developers
Milestone ⇒
Patch ⇒ No
State ⇒ Assigned
Reply to this comment
Switching from https -> http or the reverse causes full url generation 
to break:



The default value for $conf[server][port] is $_SERVER[SERVER_PORT], so 
once you login under https the value is set to 443. If you then switch 
protocols, since the config is cached in the session, that value is 
now wrong.



Not sure of the correct fix, but I'm thinking maybe we need to set the 
value of conf[server][port] on every page load in 
Registry::importConfig()?

Saved Queries