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

Blank login success page when /login missing url params #888

Closed
juanvallejo opened this issue Nov 17, 2016 · 5 comments
Closed

Blank login success page when /login missing url params #888

juanvallejo opened this issue Nov 17, 2016 · 5 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/P2

Comments

@juanvallejo
Copy link
Contributor

juanvallejo commented Nov 17, 2016

Related Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1369854

Opening this issue mostly for feedback / discussion

When logging in through the web-console without any redirect information https://localhost:8443/login, a blank page is displayed after a successful attempt. This makes sense, as the server only seems to attempt an http redirect if the then parameter it receives is not empty here https://github.com/openshift/origin/blob/master/pkg/cmd/server/origin/auth.go#L757-L764

In order to avoid this however, I was wondering if there could simply be a default value for the then parameter that is sent to the server? Also, would a change like this take place on the login page template? https://github.com/openshift/origin/blob/master/pkg/auth/server/login/templates.go#L2399

cc @liggitt @fabianofranz @jwforres

@liggitt
Copy link
Contributor

liggitt commented Nov 17, 2016

if we can come up with a reasonable default redirect, I would redirect a request to /login that did not specify a then param there prior to login

@jwforres
Copy link
Member

the project list seems like the most reasonable choice

@liggitt
Copy link
Contributor

liggitt commented Nov 17, 2016

login server doesn't know anything about the console. I was considering redirecting to /, which would forward to /console if enabled, which would kick into a regular login flow. Critically, the console needs to be expecting the login to set up the proper csrf/nonce/state stuff to avoid a warning about an unexpected OAuth flow appearing

@juanvallejo
Copy link
Contributor Author

juanvallejo commented Nov 17, 2016

@liggitt I added

if len(then) == 0 {
    then = "/"
}

right before this line https://github.com/openshift/origin/blob/master/pkg/auth/server/login/login.go#L172 and it successfully forwards to /console allowing me to arrive at the projects list page. Although I'm assuming this behavior should be left for the client to handle, rather than "fixing" it server side?

@liggitt
Copy link
Contributor

liggitt commented Nov 17, 2016

fixed in openshift/origin#11961

@jwforres jwforres added kind/bug Categorizes issue or PR as related to a bug. priority/P2 labels Nov 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/P2
Projects
None yet
Development

No branches or pull requests

3 participants