Description:
Easy!Appointments CalDAV sync fails with 401 Unauthorized when connecting to CalDAV servers that require Digest authentication (e.g., SabreDAV-based servers like zxcs.nl).
Steps to Reproduce:
- Set up a CalDAV server with Digest authentication (SabreDAV default)
- Configure Easy!Appointments CalDAV sync with server credentials
- Attempt to connect or sync
- Observe
401 Unauthorized error with message: "No 'Authorization: Digest' header found"
Expected Behavior:
CalDAV sync should work with both Basic and Digest authentication methods.
Actual Behavior:
Only Basic authentication is supported, causing connection failures with Digest-only servers.
Root Cause:
In application/libraries/Caldav_sync.php, the get_http_client() method uses Basic authentication only:
'auth' => [$caldav_username, $caldav_password],
Proposed Solution:
Add Digest authentication support:
// Option 1: Always use Digest (may break Basic-only servers)
'auth' => [$caldav_username, $caldav_password, 'digest'],
// Option 2: Configurable authentication type
$authType = $provider['settings']['caldav_auth_type'] ?? 'basic';
'auth' => [$caldav_username, $caldav_password, $authType],
// Option 3: Auto-detect based on server response
Affected Version:
Easy!Appointments v1.5.0+
Workaround:
Manually edit Caldav_sync.php to add 'digest' as the third parameter in the auth array.
Additional Context:
- Tested with zxcs.nl CalDAV server (SabreDAV 4.4.0)
- Error:
Sabre\DAV\Exception\NotAuthenticated: No 'Authorization: Digest' header found
- Fix verified working with Digest authentication
Description:
Easy!Appointments CalDAV sync fails with
401 Unauthorizedwhen connecting to CalDAV servers that require Digest authentication (e.g., SabreDAV-based servers like zxcs.nl).Steps to Reproduce:
401 Unauthorizederror with message: "No 'Authorization: Digest' header found"Expected Behavior:
CalDAV sync should work with both Basic and Digest authentication methods.
Actual Behavior:
Only Basic authentication is supported, causing connection failures with Digest-only servers.
Root Cause:
In
application/libraries/Caldav_sync.php, theget_http_client()method uses Basic authentication only:Proposed Solution:
Add Digest authentication support:
Affected Version:
Easy!Appointments v1.5.0+
Workaround:
Manually edit
Caldav_sync.phpto add'digest'as the third parameter in the auth array.Additional Context:
Sabre\DAV\Exception\NotAuthenticated: No 'Authorization: Digest' header found