When during CalDAV setup the server returns 401 Unauthorized, tell the user that its password is wrong
File → New → Collection Account. I provide as email address xyz@milter.aegee.org, which does not exist. I select “Look up CalDAV/CardDAV server”, and deselect “Lookup SRV records” and “Lookup configuration for email domain”. Click “Look Up”, provide any password. Evolution searches and says “Found no candidates. It can also mean that the server doesn’t provide any information about its configuration using the selected lookup methods.”
I start with CALDAV_DEBUG=1 CARDDAV_DEBUG=1 WEBDAV_DEBUG=1 evolution-3.39.1
.
The log contains four
< HTTP/1.1 401 Unauthorized
< Soup-Debug-Timestamp: 1603016796
< Soup-Debug: SoupMessage 2 (0x7fc3cc0290e0)
< Date: Sun, 18 Oct 2020 10:26:35 GMT
< Content-Type: text/html; charset=utf-8
< Content-Length: 453
< Connection: close
< Vary: Accept-Encoding
< WWW-Authenticate: Negotiate
< WWW-Authenticate: Basic realm="AEGEE.ORG"
<
and two:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><title>401 Unauthorized</title></head><body><h1>Unauthorized</h1><p>Authentication failed</p><hr><address>Cyrus-HTTP/3.2.4-159-ge07208e90 Cyrus-SASL/2.1.27 Lib/XML2.9.10 Jansson/2.13.1 Wslay/1.1.1 OpenSSL/1.1.1h Zlib/1.2.11 Brotli/1.0.9 Xapian/1.4.17 LibiCal/3.0 ICU4C/67.1 SQLite/3.33.0 Server at 127.0.0.3 Port 80</address></body></html>
So for two of the “401 Unauthorized” the body is logged, and for the other two it is not logged.
- When the server says “401 the provided username/password do not match”, communicate this to the user, ideally after the first 401 answer.