GNOME Bugzilla – Bug 501389
Manually connecting to a password protected DAAP share fails
Last modified: 2012-03-14 13:27:33 UTC
Please describe the problem: When connecting to a manually connected DAAP share which requires a password, no prompt is provided. Running with "-D daap" indicates that the daap module knows it requires a password, but this is not acted upon. Connecting to a password protected DAAP share advertised via avahi works as expected. Steps to reproduce: 1. Manually add a password protected share. 2. Try to connect to the share. 3. ... Actual results: Expected results: Does this happen every time? Yes Other information: The following debug output is repeated several times a second: (22:20:27) [0x80da028] [rb_daap_connection_do_something] rb-daap-connection.c:1475: Doing something for state: 1 (22:20:27) [0x80da028] [rb_daap_connection_do_something] rb-daap-connection.c:1516: Logging into DAAP server (22:20:27) [0x80da028] [http_get] rb-daap-connection.c:663: Queued message for http://192.168.1.6:3689//login (22:20:27) [0x80da028] [actual_http_response_handler] rb-daap-connection.c:444: Received response from http://192.168.1.6:3689/login: 401, Unauthorized (22:20:27) [0x80da028] [actual_http_response_handler] rb-daap-connection.c:564: Error getting http://192.168.1.6:3689/login: 401, Unauthorized (22:20:27) [0x80da028] [handle_login] rb-daap-connection.c:735: Incorrect password
In plugins/daap/rb-daap-plugin.c , function new_daap_share_resolve_cb, it calls mdns_service_added with password_protected = FALSE. Then down in rb_daap_connection_do_something it just get to priv->state = DAAP_LOGIN, and then you got the loop going. //Anton
there is a similar bug on https://bugs.launchpad.net/rhythmbox/+bug/230583
I would like to confirm this bug. I am using Ubuntu Hardy Heron, and until I ran Rhythmbox from the terminal with debug messages turned on I thought this was an error with my router. Until this is fixed, I will have to share my music without password protection to be able to access it from work; this, I assume, is a crime, since now anyone can listen to my music without having paid for it. Obviously, I deem this bug quite a serious one.
I can confirm this bug with rb 0.11.5
*** Bug 515999 has been marked as a duplicate of this bug. ***
so. still having this bug - this worked for me in 0.12.6 In my opinion it's solved
Moving this to libdmapsharing as that's where the code that handles this is now. We probably just need to set priv->password_protected to TRUE in when we get a SOUP_STATUS_UNAUTHORIZED or FORBIDDEN in response to a login request. I haven't tested this, though.
*** Bug 635024 has been marked as a duplicate of this bug. ***
At line 727 in rhythmbox-0.13.2/plugins/daap/rb-daap-plugin.c. service.password_protected = FALSE; The setting is just hard-coded to false. At line 644 in rhythmbox-0.12.8/plugins/daap/rb-daap-plugin.c there is the same setting hard coded setting. I changed the setting to TRUE and compiled getting a new libdaap.so and replace the one that I have in fedora 13 x86_64 and it now it prompts me for the password and works. mdns_service_added (NULL, g_strdup (location), g_strdup (location), g_strdup (host), port, TRUE,// FALSE, plugin); So now it works with password protected daap, but not unprotected daap. Anyway, I think that this confirms that service.possword_protected need to be set based on a response from the server rather than just hard-coded.
Created attachment 187539 [details] [review] Patch to fix authentication in DAAP plugin I turns out that the authentication handling routines need some work. Please try the attached Rhythmbox patch along with libdmapsharing Git master (also in GNOME Git). This refactors the DAAP plugin's handling of authentication so that it is more inline with what libsoup expects. I still have to do some clean up work, particularly figuring out how to nicely encapsulate "...soup_auth_authenticate (auth, username, password); soup_session_unpause_message (session, msg);..." in rb-daap-source.c. The present solution will change the libdmapsharing ABI. I could avoid this, but the result would have some cruft, because the "get password" state in no longer applicable in the DMAPShare state machine.
I committed the change mentioned above to Rhythmbox Git. Libdmapsharing 2.9.9+ is now required to build the DAAP plugin. It has been a while since there was any feedback for this bug. I will close it; please reopen with a clear comment if necessary.
Reproduced on rhythmbox rhythmbox 2.95.5-0ubuntu1. See debug log at https://launchpadlibrarian.net/96652438/rhythmbox-debug.txt