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

Fix login page fragment handling after soft reload on Firefox #353

Merged
merged 4 commits into from Jan 31, 2020
Merged

Fix login page fragment handling after soft reload on Firefox #353

merged 4 commits into from Jan 31, 2020

Conversation

ghost
Copy link

@ghost ghost commented Jan 17, 2020

Description

Fixes #352.

Motivation and Context

Soft reloads on Firefox screw up the redirect link on the sign in page; see #352 for details.

How Has This Been Tested?

I've downloaded the generated sign in page, manually applied the change from this PR, opened it in Firefox and tested it there (with the developers tools).

Checklist:

  • My change requires a change to the documentation or CHANGELOG.
  • I have updated the documentation/CHANGELOG accordingly.
  • I have created a feature (non-master) branch for my PR.

@ghost ghost requested review from steakunderscore and loshz as code owners January 17, 2020 13:56
@ghost ghost self-requested a review January 17, 2020 13:56
@ghost
Copy link
Author

ghost commented Jan 21, 2020

(Rebased to resolve conflicts.)

JoelSpeed
JoelSpeed previously approved these changes Jan 26, 2020
Copy link
Member

@JoelSpeed JoelSpeed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really know Javascript all that well, but I think this is ok

I'm gonna approve but I'd like an ack from another maintainer before we merge

Thanks @ffdybuster

@ghost
Copy link
Author

ghost commented Jan 27, 2020

(Rebased to resolve conflicts.)

templates.go Outdated
Comment on lines 138 to 143
var idx = inputs[i].value.indexOf('#');
if (idx >= 0) {
inputs[i].value = inputs[i].value.substr(0, idx);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind adding a brief comment to outline what happens here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. I added comments, I hope it's now easier to understand!

@JoelSpeed
Copy link
Member

Apologies @ffdybuster, because we have recently cut a release, the changelog entry you've added is in the wrong place now, if you could move it up to the new heading, then I'm happy to get this merged 👍

@felixfontein
Copy link
Contributor

@JoelSpeed thanks, I overlooked that it ended up in the wrong place. I've updated the PR.

Copy link
Member

@JoelSpeed JoelSpeed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ffdybuster, LGTM!

@syscll I'll let you do the honours

(Totally not your fault on the changelog btw, we move a lot of stuff as we cut releases so the first few PRs in always have to have the entries moved)

@loshz loshz merged commit 9670f54 into oauth2-proxy:master Jan 31, 2020
@ghost ghost deleted the fix-login-page-firefox branch January 31, 2020 11:14
@ghost
Copy link
Author

ghost commented Jan 31, 2020

@JoelSpeed @syscll thanks for reviewing this!

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

Successfully merging this pull request may close these issues.

Login page: if reloaded in Firefox, hash will be added again
3 participants