Skip to content
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

contacts.icloud.com uses multiple hosts #61

Open
nic-gibson opened this issue Mar 20, 2022 · 2 comments
Open

contacts.icloud.com uses multiple hosts #61

nic-gibson opened this issue Mar 20, 2022 · 2 comments
Labels

Comments

@nic-gibson
Copy link

FindAddressBookHomeSet returns only the path of the URL returned from the PROPFIND request. However, iCloud returns a different host name as well as the path. This is then discarded. Trying to retrieve any address objects will then fail with an error as the wrong host is being queried.

Looking at other carddav servers this is not normal behaviour but there doesn't seem to be anything in RFC 6352 that disallows it.

@nic-gibson
Copy link
Author

For example -

curl -s -X PROPFIND -u "[email protected]" -H "Depth: 0"  --data "<propfind xmlns='DAV:' xmlns:cd='urn:ietf:params:xml:ns:carddav'><prop><cd:addressbook-home-set/></prop></propfind>" https://contacts.icloud.com/1234567/principal

returns

<?xml version="1.0" encoding="UTF-8"?>
<multistatus xmlns="DAV:">
	<response>
		<href>/1234567/principal/</href>
		<propstat>
			<prop>
                <addressbook-home-set xmlns="urn:ietf:params:xml:ns:carddav">
                    <href xmlns="DAV:">https://p37-contacts.icloud.com:443/1234567/carddavhome/</href>
                </addressbook-home-set>
			</prop>
			<status>HTTP/1.1 200 OK</status>
		</propstat>
	</response>
</multistatus>

@emersion
Copy link
Owner

Related: #24

@emersion emersion added the bug label Mar 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants