Skip to content

Login redirect one / too many #3404

Description

@XDjackieXD

Describe the Bug

When clicking a link someone sent me, I got redirected to a wrong URL after login.
For example when following a link https://bookstack.example.org/books/blafoo/page/bar I get redirected to the SAML login, I log in and get redirected back to https://bookstack.example.org//books/blafoo/page/bar.
As there is one / too many, I get presented a 404 Page. When clicking the same link again now that I'm logged in everything is working correctly.

I updated bookstack yesterday to the latest stable (v22.04) from a rather old version (not sure which one it was but it was quite a few months old) and the issue was not happening before the upgrade.

Steps to Reproduce

  1. Setup BookStack 22.04 with SAML login
  2. Log out of bookstack if logged in (you don't need to log out from your SAML IdP)
  3. Click a link to a valid page
  4. Log in
  5. Get redirected to a page containing two slashes in between the base URL and the path and get presented a 404
  6. Click the same link again
  7. See the correct page

Expected Behaviour

Get redirected to the same URL I originally clicked after login.

Screenshots or Additional Context

No response

Browser Details

Firefox 100.0b9 on Linux, also reported by one user running Chrome on Windows

Exact BookStack Version

v22.04

PHP Version

7.4

Hosting Environment

Ubuntu 18.04.6 in a Proxmox (LXC) Container with NGINX and PHP-FPM 7.4 with the exact same NGINX config snippet from the BookStack installation documentation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions