Page 1 of 1

server.url config variable doesn't work on password reset

Posted: Mon Jun 27, 2016 2:06 pm
by jormatuomainen
Hi,

I have instance of LogicalDoc CE behind nginx as reverse proxy (doing TLS termination).
So it's https://docs.domain.tld/ (default 443 port), tomcat itself is running on localhost:8080.
server.url is configured as https://my_server/
some how password links are in form of http://docs.domain.tld:80/pswrecovery?ticketId...

I did restart tomcat, even removed work and temp and restarted, still no effect.

Should the part of $url in email templates come from server.url?

Re: server.url config variable doesn't work on password rese

Posted: Tue Jun 28, 2016 10:46 am
by car031
Hi, but in case of password recover that parameter must not be used. We imagine that the user is in the GUI and forgot the password, he ask for the reset and he immediately receive a message in his email. Now the URL must be the same he is seing in the browser, independently from the url you specifed in server.url.

Re: server.url config variable doesn't work on password rese

Posted: Tue Jun 28, 2016 10:55 am
by jormatuomainen
The link should use the same (https://docs.domain.tld/) but it doesn't. It changes protocol to http and port to 80.

So it uses neither the server.url (which it should), nor the localhost:8080 (which the reverse proxy connects) nor the https (default port 443) that the client browser connects. It's specified as $url in the email templates but where does it get the value? I did of course did unsecure hack to forward http to https with get params, but it's not exactly a good solution, do you have a better one?

Re: server.url config variable doesn't work on password rese

Posted: Tue Jun 28, 2016 11:07 am
by car031
for that messate $url is computed dynamically and the current URL you see in the browser is used, but the scheme and port should be correctly replicated.
What version of LogicalDOC are you using ?

Re: server.url config variable doesn't work on password rese

Posted: Tue Jun 28, 2016 5:05 pm
by jormatuomainen
7.4.3 community edition, but I do have the nginx in front of it doing the ssl termination (I can't figure out the 80 port though, that is not used).

Re: server.url config variable doesn't work on password rese

Posted: Tue Jun 28, 2016 5:31 pm
by car031
tried on a 7.5 and the URL is correct-

Re: server.url config variable doesn't work on password rese

Posted: Tue Jun 28, 2016 8:11 pm
by jormatuomainen
Ok, I'll try updating soon.