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

+ gets lost when requesting login with oAuth2 #7762

Closed
HanaGemela opened this issue Feb 24, 2020 · 4 comments
Closed

+ gets lost when requesting login with oAuth2 #7762

HanaGemela opened this issue Feb 24, 2020 · 4 comments
Assignees
Labels
bug p2-high Escalation, on top of current planning, release blocker
Milestone

Comments

@HanaGemela
Copy link
Contributor

Server: 10.4.0 RC3
Client: 2.6.1 (build 13096)

Steps to recreate:

  1. Install oAuth2 on the server
  2. Add a new account with username name+2@test.com in the client
  3. Log out
  4. Log in

Actual result: Client requests login for name 2@test.com -> not possible to login
Expected result: Client requests login for name+2@test.com

Screenshot 2020-02-24 at 11 00 10

Found when testing owncloud/core#36613

@HanaGemela HanaGemela added bug p2-high Escalation, on top of current planning, release blocker labels Feb 24, 2020
@michaelstingl michaelstingl added this to the 2.6.3 milestone Feb 24, 2020
@ogoffart
Copy link
Contributor

We use QUrlQuery to encode all our fields (in OAuth::authorisationLink)
+ normaly does not need to be encoded. The documentation of QUrlQuery has a documentation about that: https://doc.qt.io/qt-5/qurlquery.html#handling-of-spaces-and-plus
But QUrlQuery does not seem to allow to force the percent-encoding of +

The owncloud server understands an unencoded + as a space, which i think is a server bug.

We could workaround the problem by doing a search and replace of + with %2B in the query.

ogoffart added a commit that referenced this issue Feb 25, 2020
The server understands '+' as a space.

Issue #7762
ogoffart added a commit that referenced this issue Feb 25, 2020
The server understands '+' as a space.

Issue #7762
@michaelstingl
Copy link
Contributor

The owncloud server understands an unencoded + as a space, which i think is a server bug.

Open issue?

@jnweiger
Copy link
Contributor

A '+' (plus) is well known but historic url-encoding for a ' ' (whitespace). A raw plus character should always be percent-encoded, to avoid confusion.

https://de.wikipedia.org/wiki/URL-Encoding mentions that form-url-encoding differs from normal url-encoding because of the use of '+'. I disagree.

@michaelstingl
Copy link
Contributor

fixed in #7771

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug p2-high Escalation, on top of current planning, release blocker
Projects
None yet
Development

No branches or pull requests

4 participants