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

cards are rewritten on retrieval #834

Closed
mbiebl opened this issue May 17, 2016 · 4 comments
Closed

cards are rewritten on retrieval #834

mbiebl opened this issue May 17, 2016 · 4 comments
Labels
Milestone

Comments

@mbiebl
Copy link
Contributor

mbiebl commented May 17, 2016

This is a followup for https://groups.google.com/d/msg/sabredav-discuss/VTqllUhSl4k/rwNE8TUcAgAJ

To reproduce the problem, I did the following

1/ create composer.json pulling in sabre/dav 3.1.*

  - Installing sabre/uri (1.1.0)
    Downloading: 100%         

  - Installing sabre/event (3.0.0)
    Loading from cache

  - Installing sabre/http (4.2.1)
    Downloading: 100%         

  - Installing sabre/xml (1.4.1)
    Downloading: 100%         

  - Installing sabre/vobject (4.1.0)
    Loading from cache

  - Installing sabre/dav (3.1.3)
    Loading from cache

2/ Create a server.php based on ./vendor/sabre/dav/examples/addressbookserver.php, setup mysql as backend
3/ Create a "sabredav" database and load ./vendor/sabre/dav/examples/sql/mysql.*.sql
4/ Use the browser plugin to login as admin/admin
5/ Create a "Test" addressbook and upload the attached test.vcf (renamed to .txt so I can attach to github).
test.vcf.txt
This .vcf file was checked with vobject validate

vobject validate test.vcf 
sabre/vobject 4.1.0
vCard: 3.0
  No warnings!

6/ Check the mysql database, in the vcards table for this card. The contents of "cardsdata" are attached as cards-carddata.bin.txt (they are identical to test.vcf)
cards-carddata.bin.txt

7/ Download the card again, I used the browser plugin. The resulting card is attached as test-get.vcf.txt
test-get.vcf.txt

This card is no longer the original card or what's stored in the mysql db. See the diff

$ diff test.vcf.txt test-get.vcf.txt -u
--- test.vcf.txt    2016-05-17 16:02:55.571477700 +0200
+++ test-get.vcf.txt    2016-05-17 16:07:54.952288800 +0200
@@ -3,9 +3,9 @@
 UID:5C-2F-7F-08-B6-93-F8-EC-34-88-85-A4-14-DA-8A-A0
 N:Saveley;Art;;;
 ORG:Identity Corp;Sales
-EMAIL;INTERNET:[email protected]
+EMAIL;TYPE=INTERNET:[email protected]
 FN:Art Saveley
-TEL;WORK:7675-3425
-ADR;Work:;;Kälberpfad 215;Graz;Foo Bär;10112;Austria
+TEL;TYPE=WORK:7675-3425
+ADR;TYPE=WORK:;;Kälberpfad 215;Graz;Foo Bär;10112;Austria
 TITLE:Position Sales
 END:VCARD

So it seems the card is automatically "repaired" on retrieval for some reason.

@mbiebl
Copy link
Contributor Author

mbiebl commented May 17, 2016

As an additional note: I didn't see this behaviour with 2.*

@evert
Copy link
Member

evert commented May 21, 2016

Confirming that I'm seeing the exact same thing.

@evert evert added the bug label May 21, 2016
@evert evert closed this as completed in e25f1bb May 21, 2016
@evert
Copy link
Member

evert commented May 21, 2016

This is now fixed on master.

@evert evert added this to the 3.2 milestone May 21, 2016
@mbiebl
Copy link
Contributor Author

mbiebl commented May 21, 2016

Thanks for the fix
Am 21.05.2016 05:45 schrieb "Evert Pot" [email protected]:

This is now fixed on master.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
https://github.com/fruux/sabre-dav/issues/834#issuecomment-220756527

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