Forum OpenACS Development: Re: OpenACS 5.10.0 beta 1 available

Collapse
Posted by Gustaf Neumann on
The URL "http://192.168.0.176:/" is invalid according to the RFC.
The URL would be valid "http://192.168.0.176/". This looks like sloppy URL generation to me.
Collapse
Posted by Frank Bergmann on
Interesting, somebody seems to have anticipated this in utilities-procs.tcl line #1983:

ns_log Error "util_current_location got invalid information from driver '[ns_conn location]'"

However, the split_location check breaks completely instead of just returning 0...

Cheers
Frank

Collapse
Posted by Frank Bergmann on
I've temporarily disabled the ns_parseurl call.

Now I get:

can't read "current_host": no such variable
while executing "ad_get_node_id_from_host_node_map $current_host"
(procedure "security::get_register_subsite" line 7)
invoked from within "security::get_register_subsite"
(procedure "::nsf::procs::ad_get_login_url" line 4)
invoked from within "ad_get_login_url -return"
(procedure "::nsf::procs::auth::require_login" line 17)
invoked from within "auth::require_login"

Cheers
Frank

Collapse
Posted by Antonio Pisano on
The call cannot just be disabled, as it is expected to provide the values that you are finding to be missing shortly afterwards.

I think your best bet should be to try Gustaf's suggestion and fix the URL.

Collapse
Posted by Frank Bergmann on
Have a look, the URL is coming directly from [ns_conn location]! Try a regexp or whatever to fix/work around the situation, but please make it work. These are regression bugs from our perspective, because you have broken stuff that used to work.

Cheers
Frank

Collapse
Posted by Antonio Pisano on
ns_parseurl became stricter in recent Naviserver and won't parse URLs that do not comply with the RFC. However, I have never experienced the issue you report on a regular installation, so I suspect a problem with your configuration or some local modification.

We can try and help you troubleshoot the problem if you want. Can you please show an excerpt of your config.tcl file where you show the address and port you have defined for your server? Can you also try first on an installation consisting only of OpenACS 5.10 beta?

Collapse
Posted by Frank Bergmann on
Hi Antonio,

won't parse URLs that do not comply with the RFC

I understand.

suspect a problem with your configuration

I would reformulate and say that our configuration might be outside your usual test coverage :-) However, it worked with OACS 5.9.1 or earlier, so you somehow broke compatibility.

I understand this is an instance of the "works on my system" problem. It's very, very common...

help troubleshoot

Here is the default config script:
http://po51demo.project-open.net/config.vanilla.txt

I guess there will be a total of ~20 issues in OACS 5.10, about 15 old ones (5.9.1 and earlier) and ~5 new ones (just guessing). I can provide you with a development system to allow you to quickly reproduce these issues.

Bests
Frank

Collapse
Posted by Antonio Pisano on
The default config script is not helpful, as it does not reproduce the situation that brings to the broken URL. My speculation is that this has something to do with the way host and port are configured on the instance that is "misbehaving". The URL ends up with an invalid ":" at the end, which is at the core of your problem, and you should try and find out why.

Concerning new and existing issues, please report them in the bug tracker, if you did not already and we will try to address them. If they are severe enough, they might be fixed before the 5.10 release.

Collapse
Posted by Frank Bergmann on
Hi Antonio,

I found this old posting from March 2021, the validated_host_header cause the same issue already in 5.9.1 (but not in the previous one):

https://openacs.org/forums/message-view?message_id=5513615

Cheers
Frank

Collapse
Posted by Malte Sussdorff on
I had this behavior when running OpenACS behind NGINX I think in SSL mode. So if your reverse proxy handles SSL and you „only“ run Naviserver in HTTP mode yet have https configured in the parameters of OpenACS this might be the reason for the problem. I‘d need to dig up the details if this is of interest, but maybe open a new topic?