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

Change OAuth2 redirect link to relative link #19646

Merged
merged 1 commit into from
Jul 1, 2020
Merged

Change OAuth2 redirect link to relative link #19646

merged 1 commit into from
Jul 1, 2020

Conversation

firlevapz
Copy link
Contributor

@firlevapz firlevapz commented Feb 25, 2020

Fix #19400

fix issue with third-party apps like rocket.chat
where browser in external window is opened
and thus oauth2 login does not work

Signed-off-by: Fabian Helm firlevapz@gmail.com

fix issue with third-party apps like rocket.chat
where browser in external window is opened
and thus oauth2 login does not work

Signed-off-by: Fabian Helm <firlevapz@gmail.com>
@kesselb kesselb requested a review from rullzer February 25, 2020 21:12
@kesselb kesselb added 3. to review Waiting for reviews bug labels Feb 25, 2020
@kesselb kesselb added this to the Nextcloud 19 milestone Feb 25, 2020
@kesselb
Copy link
Contributor

kesselb commented Feb 25, 2020

Have you tested the change with a Nextcloud 18 instance? You mentioned 16.0.8 in #19400.

@firlevapz
Copy link
Contributor Author

I'm running the server via snap with version 17.0.3 where the problem still persists (and the fix is working), I will try it with nextcloud 18 on a testing instance and then tell you

@kesselb
Copy link
Contributor

kesselb commented Feb 25, 2020

Thanks 👍

@firlevapz
Copy link
Contributor Author

I just tested it with version 18.0.1 and the problem still persists and this patch solves it.

I also tested the nextcloud desktop client and mobile client and they are both still working with this patch applied.

@rullzer
Copy link
Member

rullzer commented Feb 26, 2020

I'm a bit puzzled what this solves?
Do full links get opened in an external program? (if so they should probably check if the url is the same?).

@firlevapz
Copy link
Contributor Author

The rocket.chat desktop client unfortunately automatically opens absolute urls in a new, external browser-window - if it's a relative link, then you continue in the electron app and oauth2 is working as it should.

Unfortunately i have no idea, how to adapt the code for this client, and the easiest solution I found for this issue between rocket-chat and nextcloud would be this proposed change here.
Do you have any objections that changing the link to a relative url is a security issue or it could break other functionalities?

Copy link
Member

@rullzer rullzer left a comment

Choose a reason for hiding this comment

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

Should be fine IMO

This was referenced Apr 4, 2020
This was referenced Apr 15, 2020
@rullzer rullzer mentioned this pull request Apr 23, 2020
11 tasks
@rullzer rullzer removed this from the Nextcloud 19 milestone Apr 30, 2020
@firlevapz
Copy link
Contributor Author

@nickvergessen @icewind1991 @ChristophWurst sorry to bother you, but it would be great if you could review this one-line-PR to solve the login-troubles with rocket-chat on my nextcloud-instance

Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

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

👍 🐘

@nickvergessen nickvergessen added this to the Nextcloud 20 milestone Jul 1, 2020
@nickvergessen nickvergessen merged commit ebedbf1 into nextcloud:master Jul 1, 2020
@welcome
Copy link

welcome bot commented Jul 1, 2020

Thanks for your first pull request and welcome to the community! Feel free to keep them coming! If you are looking for issues to tackle then have a look at this selection: https://github.com/nextcloud/server/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22

@holzhannes
Copy link

May you add this one line change to Milestone 19.0.1? Would be very kind 😊 or is it not possible?

@rullzer
Copy link
Member

rullzer commented Jul 4, 2020

/backport to stable19

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

Successfully merging this pull request may close these issues.

OAuth2 Login opens in new browser window
6 participants