Skip to content

HTTPS connection downgraded to HTTP after social login success #1536

Description

@mariuskiessling

After a user successfully authenticated using the social AzureAD login, BookStack receives Azure's login redirect (via HTTPS) but drop to HTTP when redirecting to the homepage. I could not test it using a different authentication provider but this issue should not be limited to AzureAD logins.

This issue occurs due to a faulty location header in BookStack's callback handler response.

return redirect()->intended('/');

The app URL is set to HTTPS.

Steps To Reproduce

  1. Start the authentication flow using the AzureAD authentication driver
  2. Login on the Microsoft login page
  3. Get redirected to BookStack
  4. Get redirected again to the intended page (or /)
  5. The connection is now no longer secured using HTTPS but is established via HTTP

Expected behavior
After the callback by AzureAD is processed, don't redirect the user to the insecure HTTP site.

Screenshots
Screen Shot on 2019-07-15 at 16:23:06

Configuration

  • BookStack Version: v0.26.2
  • PHP Version: 7.something
  • Hosting Method (Nginx/Apache/Docker): Docker using NGINX

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

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions