View Issue Details

IDProjectCategoryView StatusLast Update
0001416SOGo Connectorwith external serverpublic2013-01-29 20:46
ReporterMarten Gajda Assigned Tofrancis  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.105 
Summary0001416: vCard BDAY not correctly imported if format is yyyymmdd instead of yyyy-mm-dd
Description

BDAY field is not correctly imported from vcards if the date format is not yyyy-mm-dd but yyyymmdd.

The address book shows the birthday as:

Geburtstag: 20040814

instead of

Geburtstag: 14.08.2004

like it does when the vcard uses the yyyy-mm-dd format.

According to RFC2426 and RFC2425, the format yyyymmdd is perfectly valid.

RFC2426 states:

Type name: BDAY

Type purpose: To specify the birth date of the object the vCard
represents.

Type encoding: 8bit

Type value: The default is a single date value. It can also be reset
to a single date-time value.

and later:

date-value = <A single date value as defined in [MIME-DIR]>

MIME-DIR means RFC 2425 which states:

date = date-fullyear ["-"] date-month ["-"] date-mday

the braces [] make the dashes optional so yyyymmdd, yyyy-mmdd and yyyymm-dd are all valid representations of yyyy-mm-dd.

TagsNo tags attached.

Activities

francis

francis

2011-08-17 15:36

administrator   ~0002805

This is probably a bug in Thunderbird, not in SOGo Connector.

2013-01-24 17:58

 

bday.js (337 bytes)
tempura

tempura

2013-01-24 18:03

reporter   ~0005253

Sorry francis, but is a SOGo Connector bug. I am using version 17.0.2 here.

In the file vcards.utils.js look for "bday:". The relevant function will split the birthday by the dashes - so in this context they are mandatory. But, as Marten has investigated, they are optional.

So the solution is to remove the dashes in the first step and then parse the remaining YYYYMMDD using substrings.

The corrected code is in bday.js.

I have successfully tested the fix using ownCloud, as ownCloud will send dates as YYYYMMDD.

Before the fix, the dates could not be edited in Thunderbird and also the ThunderBirthday addon did not show up any entries.
Now everything is working fine.

Greetings,
tempura

francis

francis

2013-01-29 20:46

administrator   ~0005273

Fixed for TB10 and TB17.

https://github.com/inverse-inc/sogo-connector.tb17/commit/1cb87ff4c81df23fd85a7afc769913f595638808
https://github.com/inverse-inc/sogo-connector.tb10/commit/82348756c766484a2d9a53386c3ad764efac1ecd

Issue History

Date Modified Username Field Change
2011-08-14 15:12 Marten Gajda New Issue
2011-08-17 15:36 francis Note Added: 0002805
2013-01-24 17:58 tempura File Added: bday.js
2013-01-24 18:03 tempura Note Added: 0005253
2013-01-29 20:46 francis Note Added: 0005273
2013-01-29 20:46 francis Status new => resolved
2013-01-29 20:46 francis Resolution open => fixed
2013-01-29 20:46 francis Assigned To => francis