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
Update roundcube carddav plugin to version 5.1.0 #2305
base: main
Are you sure you want to change the base?
Conversation
I'm having a problem where I can't create a new ownCloud contact from Roundcube after a password change (using roundcube's interface but I doubt it matters how the change is made). I get "Login failed" in nextcloud.log and "Exception/NotAuthenticated" in roundcube/carddav.log. If I set the password back, it works. It's almost as if carddav is saving the password in the roundcube database when it shouldn't be (according to the docs) |
This is a bug in carddav. The "password" field in the carddav database is "%p" encrypted with the user's password. When the password can't be decrypted because the user changed their password, the carddav code (Utils.php) returns empty string as the password instead of "%p" and then uses that verbatim as the password in rest calls to nextcloud, which of course fail. |
Adding this to carddav/config.inc.php from setup/webmail.sh fixes the issue:
No passwords are stored in the database, only "%p" appears in the password field. |
Confirmed. Nice catch 👍 |
Yes. Also, here are some additional changes suggested by the carddav maintainer Michael Stilkerich, including using address book discovery. |
I'm getting another error in the logs when migrating existing data from carddav v4:
Still trying to work it out. |
That is a most excellent reply by mstilkerich 💯 |
In addition to your changes, Mr. Stilkerich said 'accountname' should be set, and I suggest 'name' be set as well using the new template format so the address book title in roundcube looks like it used to:
|
After a migration to carddav v5, I get duplicate address books in user accounts that had existing contacts. I see "Contacts" listed twice in Roundcube in the Contacts tab, and both address books have the same contacts. The database has duplicate address book entries and duplicate contacts data. Because we have a setup where user's aren't creating their own carddav connections to other servers ('hide_preferences' is set to true), I'm thinking the best thing to do is nuke the carddav database's contacts and address books, which are all just cached entries anyway (copies of the data on nextcloud). When the user logs in, everything gets re-populated by the plugin. So, right after untaring the new carddav code in setup/webmail.php
|
@downtownallday I added your suggestions. I did not yet have time for proper testing, so this will need some attention before I consider it merge worthy. |
This updates the carddav plugin for Roundcube to the latest version.
There is a change in the configuration (usage of 'extra_addressbooks', see https://github.com/mstilkerich/rcmcarddav#upgrading-from-4x) There's also a note that perhaps a manual cleanup of the address books is needed, but that wasn't an issue for me.