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

resource is (practically) hardcoded to 'iPhone' instead of device name #216

Open
DanScharon opened this issue Apr 26, 2023 · 1 comment
Open
Labels
bug Something isn't working

Comments

@DanScharon
Copy link

DanScharon commented Apr 26, 2023

Describe the bug

Siskin uses the device name in order to set the resource string (UIDevice.current.name).
But in iOS 16, UIDevice.name has changed to only return the generic model of the device (e.g. 'iPhone'), not the user specified name.
Hence in iOS 16 Siskin exclusively sets 'iPhone' as resource string, which is not unique per device and is also rather unhelpful when debugging the same username logged in into several devices.

Proposed solution
com.apple.developer.device-information.user-assigned-device-name should be used, instead of UIDevice.current.name, cf. https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_developer_device-information_user-assigned-device-name

Alternative solution proposal
Let the server generate the resource, cf. https://wiki.xmpp.org/web/XMPP_IM_Client_Design_Guidelines#Do_not_to_encode_any_semantics_into_the_resource,_let_the_server_generate_a_resource_for_you

To Reproduce
Steps to reproduce the behavior:

  1. Go to device settings and set a device name different than 'iPhone'
  2. Use Siskin
  3. See that Siskin only sets 'iPhone' as client resource

Expected behavior
Siskin uses the device name as base for the resource so that different devices also get different resources.

cf. RFC 7622

Typically, a resourcepart uniquely identifies a specific connection

Details (please complete the following information):

  • Siskin Version: 7.3.3
  • iOS version: 16.4.1
  • iPhone model: iPhone XR
@DanScharon DanScharon added the bug Something isn't working label Apr 26, 2023
@hantu85
Copy link
Contributor

hantu85 commented Apr 26, 2023

In the future version, we will drop usage of device name at all as the resource. As new version will support SASL2 and Bind2 we will use similar way to generate resource for SASL1 and Bind1 (random opaque string).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants