Repository navigation
fix(dav): store webcal subscription credentials encrypted - #65705
SebastianKrupinski wants to merge 2 commits into
Conversation
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
|
/backport to stable35 |
|
/backport to stable34 |
|
/backport to stable33 |
|
Yes there are better ways to do this then creating the crypto library with "Server::get(ICrypto::class)". But since this is only needed for 2 operations I didn't think complicating this fix by injecting the class in the constructors was worth it, as it would require modifying event more files from the server.php to console commands |
|
@SebastianKrupinski
|
Hi @theroch You are correct we do not export the credentials field at the moment, I was on the fence on how to handle this, as you said exporting the credentials in plan text is not ideal. And there is no way to export them encrypted. Well there is by it would only work on the same system. |
|
@SebastianKrupinski 0001-perf-dav-decrypt-subscription-credentials-only-when-.patch |
It is not ideal, but the way we currently handle it in other places. This would be fixed by nextcloud/user_migration#1031 |
@DerDreschner that definitely solves the issue. I'll make the changes so the credentials get exported and your PR solves our issue. |
@SebastianKrupinski It's not a PR, only an issue I created once I've worked on other user migration exports 😅 Need to be done by @come-nc as maintainer or someone else. |
Oh. lol. I assumed you where working on it |
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
Summary
Resolves: Support webcal http auth & store credentials calendar#70
Credentials in the user info of a subscription source URL were stored in plain text and returned to clients as part of the source. They were also used without percent-decoding, so Basic auth failed for passwords containing characters such as '@', ':' or '#'.
On create and update, split the user info off the source, percent-decode it and store it encrypted in the new calendarsubscriptions.credentials column. Sending back an unchanged source without user info keeps the stored credentials. Existing subscriptions are migrated. Credentials are decrypted when listing a user's subscriptions and used for Basic auth when the feed is refreshed.
Checklist
3. to review, feature component)stable32)AI (if applicable)