Unable to login to Admin Console, when web-server is installed on non-default port

已查看 7 次
跳至第一个未读帖子

Alexander Obuhovich

未读,
2011年2月2日 10:57:572011/2/2
收件人 In-Portal Bugs
I have In-Portal installation on 8080 port instead of 80 port, which is default.

Because of that I have to specify port each time I visit website like this: http://www.site-name.com:8080/admin/

Unfortunate effect of that is that $_SERVER['HTTP_HOST'] variable also contains that port, but since it's used for cookie setting no cookies are set at the end.


I propose to strip value of PORT constant from end of SERVER_NAME constant (which is set to $_SERVER['HTTP_HOST'] by default). It's also safe for IPv6 protocol.

Unfortunate side effect is inability to login to Admin Console, since it's uses cookie-based session.

Dmitry A.

未读,
2011年2月2日 20:29:182011/2/2
收件人 in-port...@googlegroups.com
Hi Alex,


Thanks for noticing. I have some questions here.

I can specify the Port number in config.php or am I wrong here?


Are we going to have that side-effect if we are going to do what you have proposed (strip the port from server_name) or it will fix it?


DA

Alexander Obuhovich

未读,
2011年2月3日 02:35:032011/2/3
收件人 in-port...@googlegroups.com
No, port number isn't specified in config.php, since http(-s) port number is only the way to reach proper webserver where In-Portal is located.


--
You received this message because you are subscribed to the Google Groups "In-Portal Bugs Team" group.
To post to this group, send email to in-port...@googlegroups.com.
To unsubscribe from this group, send email to in-portal-bug...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/in-portal-bugs?hl=en.

Dmitry A.

未读,
2011年2月3日 22:09:212011/2/3
收件人 in-port...@googlegroups.com
I guess, all the URL automatically build with correct port which comes from $_SERVER['HTTP_HOST'], OR it's a browser does for us?

I have no issues with removing PORT from SERVER_NAME constant! My main question is whether side-affect you described happens now or will take place once we implement the change.


Thanks for clarifications.

DA

Alexander Obuhovich

未读,
2011年2月4日 02:44:032011/2/4
收件人 in-port...@googlegroups.com
It was build with correct port 4 years ago and no one has tested it ever since :)

Today $_SERVER['HTTP_PORT'] is not even available (based on PHP documentation and phpinfo I used).

Here is the patch that removes port (from SERVER_NAME constant), when present and adds it to PORT constant, when it's not default for the protocol being used (e.g. don't add :80, when http is used).




DA

--
You received this message because you are subscribed to the Google Groups "In-Portal Bugs Team" group.
To post to this group, send email to in-port...@googlegroups.com.
To unsubscribe from this group, send email to in-portal-bug...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/in-portal-bugs?hl=en.
non_standart_http_port_issue.patch

Dmitry A.

未读,
2011年2月4日 08:45:572011/2/4
收件人 in-port...@googlegroups.com
Hi Alex,

Yes it all makes sense now thank you for the patch

DA

Alexander Obuhovich

未读,
2011年2月4日 09:38:372011/2/4
收件人 in-port...@googlegroups.com
Same problem detected in debugger. Patch attached.

Can you please create 1 task for both patches and test them.



DA

--
You received this message because you are subscribed to the Google Groups "In-Portal Bugs Team" group.
To post to this group, send email to in-port...@googlegroups.com.
To unsubscribe from this group, send email to in-portal-bug...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/in-portal-bugs?hl=en.

non_standart_http_port_issue_in_debugger.patch

Alexander Obuhovich

未读,
2011年2月5日 09:27:012011/2/5
收件人 in-port...@googlegroups.com
Here is the task: http://tracker.in-portal.org/view.php?id=993

Ready for testing.

Dmitry A.

未读,
2011年3月8日 19:18:002011/3/8
收件人 in-port...@googlegroups.com
Tested good!

Ready for commit.


DA
回复全部
回复作者
转发
0 个新帖子