Bug 370934 - Uses invalid vcard names for IM data in XDG_DATA_DIR/contacts
Summary: Uses invalid vcard names for IM data in XDG_DATA_DIR/contacts
Status: RESOLVED WORKSFORME
Alias: None
Product: frameworks-kcontacts
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR minor
Target Milestone: ---
Assignee: kdepim bugs
URL: https://github.com/geier/pycarddav/is...
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-16 04:44 UTC by Jason Fagnere
Modified: 2022-11-25 05:22 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Fagnere 2016-10-16 04:44:11 UTC
The vcards in $XDG_DATA_DIR/contacts contains invalid names for IM data, the RFC (both 2426 and 6250) define the name as 1*(ALPHA / DIGIT / "-"), and KAddressbook (or akonadi?) uses "/", which is invalid, and thus may break some parsers, for example in pycarddav. it also makes these vcards unsuitable for sync between devices (my use case).

(Also, it exports vcards 4.0 with X-JABBER instead of IMPP, which isn't invalid per se, but less X- would be great, i guess)

Reproducible: Always

Steps to Reproduce:
1. Create a contact in KAddressbook with an IM address
2. Read it's vcard in ~/.local/share/contacts

Actual Results:  
BEGIN:VCARD
VERSION:3.0
FN:John Doe
N:Doe;John;;;
X-KADDRESSBOOK-X-IMAddress:John.doe@example.org
X-messaging/xmpp-All:john.doe@example.org
END:VCARD


Expected Results:  
BEGIN:VCARD
VERSION:3.0
FN:John Doe
N:Doe;John;;;
X-KADDRESSBOOK-X-IMAddress:John.doe@example.org
X-JABBER:john.doe@example.org
END:VCARD
Comment 1 Jason Fagnere 2016-10-16 05:04:37 UTC
After further digging, i guess that https://github.com/KDE/kcontacts/blob/b2194dd9d806875122c76220f77660c9de09f14d/src/vcardtool.cpp is the problem, so i moved the bug from kaddressbook to kcontacts (please correct if i'm wrong).

I also found another reference to xmessaging in https://github.com/KDE/kcontacts/blob/b2194dd9d806875122c76220f77660c9de09f14d/src/converter/vcardconverter.cpp, but it looks like the code that convert *from* x-messaging to "proper" x-(protocol) when you export vcards.

Didn't found any other reference to that x-messaging in KDE's github repos, maybe this line isn't used at all? the only references appear to convert from x-(protocol) to this invalid name (?!?) and convert from it to x-(protocol). so it may only be some legacy code that isn't used nowadays?
Comment 2 Justin Zobel 2022-10-26 03:07:15 UTC
Thank you for reporting this bug in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 3 Bug Janitor Service 2022-11-10 05:12:27 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 4 Bug Janitor Service 2022-11-25 05:22:40 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!