Skip to content

Conversation

@MichaIng
Copy link
Member

@MichaIng MichaIng commented Dec 22, 2023

Summary

By default, the name of the Nextcloud instance is an empty string, until changed by the admin. This leads to an empty realm sent with the WWW-Authenticate header, while the realm is mandatory for Basic HTTP authentication. Some clients have issues with an empty realm, e.g. Thunderbird cannot store passwords in this case.

This commit applies "Nextcloud" as fallback for the realm, in case the name of the Nextcloud instance is not set.

To solve the particular linked issue, only apps/dav/lib/Connector/Sabre/Auth.php is relevant, but I decided to align this across all DAV authentication APIs and not allow an empty realm in general.

TODO

  • ...

Checklist

@MichaIng MichaIng added bug 3. to review Waiting for reviews feature: dav feature: caldav Related to CalDAV internals feature: carddav Related to CardDAV internals labels Dec 22, 2023
@MichaIng MichaIng added this to the Nextcloud 29 milestone Dec 22, 2023
@LukasReschke LukasReschke removed their request for review December 25, 2023 07:37
@MichaIng MichaIng force-pushed the fix/dav/fallback-realm branch from 0163837 to 77a8082 Compare January 26, 2024 15:47
@icewind1991 icewind1991 requested review from a team, ArtificialOwl and sorbaugh and removed request for a team February 13, 2024 14:10
By default, the name of the Nextcloud instance is an empty string, until changed by the admin. This leads to an empty realm sent with the WWW-Authenticate header, while the realm is mandatory for Basic HTTP authentication. Some clients have issues with an empty realm, e.g. Thunderbird cannot store passwords in this case.

This commit applies "Nextcloud" as fallback for the realm, in case the name of the Nextcloud instance is not set.

Solves: https://help.nextcloud.com/t/thunderbird-dont-save-caldav-password-because-of-missing-httprealm-or-formsubmiturl/93233

Signed-off-by: MichaIng <[email protected]>
@MichaIng MichaIng force-pushed the fix/dav/fallback-realm branch from 77a8082 to 91127ed Compare February 14, 2024 15:49
@skjnldsv skjnldsv merged commit db9fd94 into master Feb 23, 2024
@skjnldsv skjnldsv deleted the fix/dav/fallback-realm branch February 23, 2024 18:42
@skjnldsv skjnldsv added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Feb 23, 2024
@MichaIng
Copy link
Member Author

/backport to stable28

@MichaIng
Copy link
Member Author

/backport to stable27

@MichaIng
Copy link
Member Author

/backport to stable26

@backportbot
Copy link

backportbot bot commented Feb 23, 2024

The backport to stable26 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable26
git pull origin stable26

# Create the new backport branch
git checkout -b backport/42459/stable26

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick 91127edc

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/42459/stable26

Error: Failed to push branch backport/42459/stable26: fatal: could not read Username for 'https://github.com': No such device or address


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@blizzz blizzz mentioned this pull request Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to release Ready to be released and/or waiting for tests to finish bug feature: caldav Related to CalDAV internals feature: carddav Related to CardDAV internals feature: dav

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants