XBackBone icon indicating copy to clipboard operation
XBackBone copied to clipboard

Https redirected to port 80 after login

Open mondolirondo opened this issue 4 years ago • 7 comments

System Info

  • PHP Version: 7.4.24
  • XBackBone Version: 3.5.1
  • Webserver: Apache
  • Database backend: SQLite

Describe the bug After login, if certain conditions are met, you get redirected to port 80 even though you are connecting throught https.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://mysite.com where XBackBone is installed
  2. You get redirected to https://mysite.com/login
  3. Fill in credentials and press "Login"
  4. You get directed to https://mysite.com:80/home (https, but port 80)
  5. The browser refuses the connection with an error

Notice that if you enter https://mysite.com/login in the address bar (avoiding the first redirection), login works fine.

Expected behavior The second time you should get directed to https://mysite.com/home

mondolirondo avatar Nov 28 '21 21:11 mondolirondo

In the file config.php, you should have the base url used to create links. You should remove the port from there.

sergix44 avatar Dec 20 '21 17:12 sergix44

Hi Sergi The base URl in config.php, does not contain the port, it must be being added somewhere else.

mondolirondo avatar Jan 22 '22 21:01 mondolirondo

I am encountering the same issue, I've tried changing .htaccess to redirect if port 80 is found on the URL but no luck, the config file has no port. I can confirm this works on a different server. Guessing it's how is pulling the Server Url, it's also pulling the port.

wearehosted avatar Aug 17 '22 10:08 wearehosted

I have the same issue. I can't use with reverse proxy, it automatically redirects to local ip with http connection

gpopesc avatar Sep 14 '22 19:09 gpopesc

I found the solution: modify the correct login domain in config file: xbackbone/data/www/xbackbone/config.php it is automatically set for first domain when you complete the installation.

gpopesc avatar Sep 14 '22 20:09 gpopesc

Mine also does this after login, even with my base_url set to like https://mydomain.com

I use traefik as my TLS ingress.

FingerlessGlov3s avatar Oct 31 '22 22:10 FingerlessGlov3s

https://github.com/SergiX44/XBackBone/pull/495

I believe this will fix it for anyone else who gets the problem.

FingerlessGlov3s avatar Oct 31 '22 22:10 FingerlessGlov3s