yuroyami / syncplay-mobile

📱 Unofficial Syncplay client app for Android and iOS. Watch stuff in sync with your friends. Works well with Syncplay on PC. Fully written in Kotlin and Compose multiplatform.
113 stars 5 forks source link

Password preventing connection #91

Open ultr41337h4xor opened 5 months ago

ultr41337h4xor commented 5 months ago

Hello, very nice idea for an app, thank you for your work!

The problem I'm having is, when I type in all the info for my server and click connect the status says "Disconnected" and when I check the server log it says the client was dropped, with the reason given being "Wrong password supplied". I tried typing it by hand and copy and pasting it, however neither method works (tried copy and pasting the password when typed on a computer as well). I'm fairly certain the password is not being typed incorrectly, as it is a simple, all lowercase string of 13 alphabetical characters.

yuroyami commented 5 months ago

Hi @ultr41337h4xor, much appreciated for the feedback :)

I am guessing you are hosting your own private server on a PC or trying to access one that is hosted by someone else ? Syncplay has its own set of public servers which are not password-protected. Just to clarify any misconceptions, the password feature is mainly for the server itself and not for the rooms. Provided that you're aware of all of this, the password feature may be broken (I haven't really tested it at all), could you please test using the official Syncplay PC client ?

ultr41337h4xor commented 5 months ago

Hi @ultr41337h4xor, much appreciated for the feedback :)

I am guessing you are hosting your own private server on a PC or trying to access one that is hosted by someone else ? Syncplay has its own set of public servers which are not password-protected. Just to clarify any misconceptions, the password feature is mainly for the server itself and not for the rooms. Provided that you're aware of all of this, the password feature may be broken (I haven't really tested it at all), could you please test using the official Syncplay PC client ?

Thanks for the quick reply! It is a private, password-protected server, hosted on another one of my computers. The rooms are not password protected. The PC clients can connect without issue. I'm pretty sure the feature is broken, as I've tried connecting with version 0.12 and the mobile client connected instantly to the same server.

Maybe the problem is connected with the new TLS feature? As I tried to shut it off and couldn't turn the setting off (it resets to "on", as soon as I back out of the menu),

yuroyami commented 5 months ago

@ultr41337h4xor Thank you for bringing this to light. It might well be due to the TLS feature, or just a regression due to the full re-write of the code after embracing Kotlin/Native Compose multiplatform. For now, you can use an older version (such as 0.12.0), they are all mainly written for Android and do not have the TLS feature.

Et0h commented 2 weeks ago

Hard to assess what might be going wrong without an example of a password and associated hash generated from Syncplay mobile, but please bear in mind that Syncplay PC client uses hashlib.md5(config['password'].encode('utf-8')).hexdigest(). The hash is lowercase, so for example foobar becomes 3858f62230ac3c915f300c664312c63f.

yuroyami commented 1 week ago

@Et0h Spot on! Server was responding with {"Error": {"message": "Wrong password supplied"}} which pointed to a problem in hash. Turns out it was generated in upper case whereas it was expected in lowercase. Thanks!