Bug #26
closedUnhandled Exception
100%
Description
After updating my phonebook, ldap crashes:
2020-10-26 20:40:34.48 info: Processed 0 of 140 contacts from address book 'Privates Adressbuch' (0 succeed, 0 skipped, 140 failed)
2020-10-26 20:40:34.48 debug:l2cpbg:carddav: chunkedMultigetVCards(addressbook='Privates Adressbuch')
(node:5191) UnhandledPromiseRejectionWarning: Error: Error: Bad status: 500
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns"\>
<s:sabredav-version>4.1.0</s:sabredav-version>
<s:exception>Sabre\Xml\LibXMLException</s:exception>
<s:message>xmlParseEntityRef: no name
on line 144, column 70</s:message>
</d:error>
at d.multigetVCards.then.catch.e (/snapshot/l2cpbg/dist/carddav.js:0:0)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:5191) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:5191) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Ftiz!Box can read in the phonebook w/o problems...
Files
Updated by Andreas Vitting almost 4 years ago
...additional info:
I have an ampersand in FN: name. But upload and download works with Fritz!Box and Thunderbird w/o any issue.
This ampersand is also in the vcf VCard file, because name of vcf = FN content.
Seems this is the problem....
Updated by Jörg Ebeling almost 4 years ago
- Estimated time set to 2:00 h
Thanks for detailed reporting.
I will check it soon during the next days.
Updated by Jörg Ebeling almost 4 years ago
Just checked the issue and made me a contact with an amperstand (&) in it.
Unfortunately I can't reproduce the issue. Probably because my code has changed a lot in between.
But to be sure, can you please check if your server is probably escaping the & character in any way (by exporting/checking the single VCF)? I had a similar issue with an old Nextcloud VCF where the " character got escape in a wrong fashion (\\").
Updated by Jörg Ebeling almost 4 years ago
Hi Andreas,
attached you'll find the next beta. You probably like to check the amperstand character issue.
This beta-2 also addresses #25, means: ORG use now index=0 by default and LDAP "department" attribute has also a default config entry.
Updated by Andreas Vitting almost 4 years ago
Hi Jörg,
just tested – same crash as before.
You can create the following vcf for testing (exactly used in this way by Baikal carddav server).
URI:
Hans & Peter.vcf
Carddata:
BEGIN:VCARD
VERSION:3.0
FN:Hans & Peter
N:;Hans & Peter;;;
TEL;TYPE=HOME:089111111
UID:20D87318-F9F4-2146-54F6-2E7EDCB76990
END:VCARD
Hopefully this helps to create the error by your own.
Von: Jörg Ebeling <projects@shbe.net>
Gesendet: Freitag, 13. November 2020 10:20
Betreff: [L2CPBG - Bug #26] Unhandled Exception
Updated by Jörg Ebeling almost 4 years ago
- % Done changed from 0 to 10
Hi Andreas,
thanks a lot for testing and reporting.
I imported your VCF sample to my nextcloud instance, but it works without any issue, exactly like my test-VCF (with an amperstand) I created before.
So I guessed that it has something to do with special escaping made by Baikal or more likely, because of the vcf file name (with the amperstand).
Unfortunately I didn't found a solution to build such a vcf with nextcloud.
For better debugging possibilities I installed Baikal via "git clone ..." pointed my webserver to it, did the admin- configuration stuff on the web-interface, created a user account (and address book) and imported the "Hans & Peter.vcf" file.
So far so good, but when I try now to point my L2CPBG to the Baikal URL/Addressbook I always get an "Bad status: 405 = Method Not Allowed: The requested method PROPFIND is not allowed for this URL" error.
Really funny that I fail to use my own tool ;-) but I'm very unfamiliar with Baikal as well as Baikal look like a very rudimentary carddav implementation for me.
Do I need to install any kind of Baikal Plugin or similar?
How does your Baikal server URL look within your L2CPBG config?
Updated by Andreas Vitting almost 4 years ago
Hello!
You’re right. Has nothing to do with content. I changed in Baikal the URI from “&” to “u.” – and it works. So the error is direct related to the vcf name used. In my opinion, this could be also done in nextcloud/owncloud, if you upload a file with an ampersand in filename.
PROPFIND is supported in Baikal.
URL for Baikal, I’m using, is:
…/baikal/html/card.php/addressbooks/”User”/”shortcut”
Von: Jörg Ebeling <projects@shbe.net>
Gesendet: Dienstag, 17. November 2020 20:57
Betreff: [L2CPBG - Bug #26] Unhandled Exception
Updated by Jörg Ebeling almost 4 years ago
- Status changed from New to Closed
- % Done changed from 10 to 100
Thanks a lot for your help, also the Baikal one ;-)
I had a wrong Rewrite condition in my apache.conf.
After that I was able to reproduce and fix the issue.
I also got it reproduced within Netxcloud (my primary debugging and test environment) after I renamed the VCF directly within Nextcloud's DB (Nextcloud assign own UUID formatted VCF names when importing VCF files).
Updated by Jörg Ebeling almost 4 years ago
By the way:
Using "http://<hostname>/dav.php" as L2CPBG Server URL is enough, but by this you're able to use multiple and selective address books in L2CPBG.
Might you take a look @ ticket #28?!