Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirect to login if session isn't valid #3541

Open
1 task done
boarder2 opened this issue Dec 14, 2018 · 2 comments
Open
1 task done

Redirect to login if session isn't valid #3541

boarder2 opened this issue Dec 14, 2018 · 2 comments

Comments

@boarder2
Copy link

  • I have searched open and closed issues for duplicates.

Environment info

  • Duplicati version: 2.0.4.5_beta_2018-11-28
  • Operating system: N/A
  • Backend: N/A

Description

Currently if the UI is password protected and you try to access the site without authenticating, the site will display an information message that says "Not logged in". You have to click with the mouse on the OK button which will redirect you to the login page.

It seems more desirable to just redirect the client to the login page immediately so the user can just start typing the password to log in.

Steps to reproduce

  1. Password protect the UI
  2. Try to access the site
  • Actual result:
    Presented with a dialog indicating that you're not logged in.
    image

  • Expected result:
    Redirected to the login page immediately.

@Pectojin
Copy link
Member

It's fairly easy to implement the change but I'm wondering if there's a reason it was implemented this way.

Perhaps something about redirect loops?

@boarder2
Copy link
Author

I tried changing the code here

response.Status = System.Net.HttpStatusCode.Unauthorized;

To just response.Redirect("login.html") and it caused the service to not be able to start due to too many redirects.

Looks like maybe there's some stuff in TrayIcon's HttpServerConnection that might handle the Unauthorized response specifically.

I'm definitely not familiar with this code at all, but if anyone can provide some insight into what might need to change, I might be willing to put some time into trying to get this done

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

No branches or pull requests

3 participants