Re: Invalid VObject, line 1 did not follow the icalendar/vcard format

Daniel Bareiro <[email protected]>
Newsgroups gmane.comp.horde.user
Message-ID <[email protected]>
Hi, Michael

Thanks for your reply.

> > Recently I am seeing these messages on the server running Horde. Is
> > it possible that these messages are related to an email that has a
> > vcard in a format that can not be processed by Horde?

> This error message is not thrown by anything that ships with Horde. We
> bundle a version of Sabre with our Dav library, but the
> VObject/Reader.php file referenced does not even contain a line 143
> let alone throw this error.

That's weird. I thought it could be an error related to Horde since the
line has this format: <timestamp> <hostname> HORDE: <message>:

----------
Dec 26 19:40:15 mail HORDE: Invalid VObject, line 1 did not follow the
icalendar/vcard format [pid 21403 on line 143 of
"/usr/share/php/Sabre/VObject/Reader.php"]
----------

This entry has been registered in /var/log/syslog. On the other hand,
the /usr/share/php/Sabre/VObject/Reader.php file has 223 lines:

----------
root@mail:~# cat /usr/share/php/Sabre/VObject/Reader.php | wc -l
223
----------

If it's helpful, this is the related code block:

----------
126         // Properties
127         //$result =
preg_match('/(?P<name>[A-Z0-9-]+)(?:;(?P<parameters>^(?<!:):))(.*)$/',$line,$matches);
128
129         if ($options & self::OPTION_FORGIVING) {
130             $token = '[A-Z0-9-\._]+';
131         } else {
132             $token = '[A-Z0-9-\.]+';
133         }
134         $parameters = "(?:;(?P<parameters>([^:^\"]|\"([^\"]*)\")*))?";
135         $regex = "/^(?P<name>$token)$parameters:(?P<value>.*)$/i";
136
137         $result = preg_match($regex,$line,$matches);
138
139         if (!$result) {
140             if ($options & self::OPTION_IGNORE_INVALID_LINES) {
141                 return null;
142             } else {
143                 throw new ParseException('Invalid VObject, line ' .
($lineNr+1) . ' did not follow the icalendar/vcard format');
144             }
145         }
----------

> The message does sound like what is being parsed is not a valid vcard
> though.

I thought that it could be an invalid vcard although I don't know if it
is possible to increase the verbosity of the log to determine what is
the email or the content that is triggering that error in order to
identify it.

> > The memory size error may be related to this?

> Maybe? Hard to say with the information at hand.

I thought it might be related since the memory error is only shown after
the "Invalid VObject" error arises.


Thanks for your time.


Kind regards,
Daniel

-- 
Horde mailing list
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: [email protected]
signature.asc (application/pgp-signature, 195 B)
-----BEGIN PGP SIGNATURE-----

iF0EARECAB0WIQS/swjWtNExsnK5Kc5mlr8bFOYdNwUCXCQOVgAKCRBmlr8bFOYd
N8z+AJwOle/RDS4WexqPBNqrSCfON6qIcQCbBHMpFXJm0LzI6+FxjBx1VjVkQbU=
=aOoJ
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.