nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
27.34k stars 4.06k forks source link

Android app claims Talk is not installed when username contains special characters #34463

Open alexhorn opened 2 years ago

alexhorn commented 2 years ago

How to use GitHub


Steps to reproduce

  1. Create a user with an Umlaut (e.g. "jöhn.doe")
  2. Install NextCloud Talk and NextCloud Talk for Android
  3. Try to log in

Expected behaviour

You should be able to log in.

Actual behaviour

App claims that Talk is not installed.

Talk app

Talk app version: 14.0.5

Custom Signaling server configured: no

Custom TURN server configured: no Custom STUN server configured: no

Server configuration

Operating system: Ubuntu 20.04

Web server: Apache

Database: MySQL

PHP version: 8.0

Nextcloud Version: 24.0.5 (via Docker)

nickvergessen commented 2 years ago

Umlauts are not allowed on the user id: https://github.com/nextcloud/server/blob/master/lib/private/User/Manager.php#L435-L440

What kind of user backend are you using to get a user with Umlauts?

alexhorn commented 2 years ago

LDAP allows umlauts in the cn and NextCloud can be configured to allow logging in using the cn.

nickvergessen commented 2 years ago

I'm not sure this is okay like this. User names would need additional encoding in several places then. So passing this on to the server as it's undesired behaviour there.

juliusknorr commented 1 year ago

I think there is some confusion between user id and login name. For the ldap case I'm currently looking at the user id is a valid UUID (e.g. 550E8400-E29B-11D4-A716-446655440000) but the login name on ldap is containing a special character.

One initial thought was that we could return the actual uid instead of the used login name on the flow v2 auth but then remembered there was a reason this was kept (just cannot think of why exactly anymore right now).

juliusknorr commented 1 year ago

Right, we need the login name of course the authenticate against ldap or external storages because with an app token you would otherwise only have the userid (uuid) which cannot be used to login through LDAP/SMB for example.