Resource file name being an encoded URL causes this URL to be accessed

  • developer

    Thanks for your report.

    Is this a DAVdroid/ez-vcard issue or is the UID invalid? Did you try with other UIDs?


  • i do not understand. what do you mean by “DAVdroid/ez-vcard”? what would be an invalid UID? i didnt try with other UIDs since the sync process takes the whole addressbook with over 100 cards in it. unfortunately sync stops with the described issue, so i dont know how to try a different UID here.

    can you explain why davdroid is using the url from the UID?

  • developer

    can you explain why davdroid is using the url from the UID?

    Ok, now I understand your problem. DAVdroid should never use the URL from your UID and I can’t imagine that it does. So you do only have a DAVdroid account on your device that you have setup with https://oc.metaccount.de/remote.php/carddav as URL?


  • exactly. i searched all my contacts for appearance of the invalid URL and the only approach was in the UIDs in the very same way the log lets suggest:

    ...
    V/davdroid.URIUtils(21906): Normalized URL https%3A%2F%2Fsmoe%2540geruechtekueche.de%40cal.geruechtekueche.de%2Fsmoe%2540geruechtekueche.de%2Fadressen%2F592DA267-54FD6CDF-35723803.vcf.vcf -> https://smoe%2540geruechtekueche.de@cal.geruechtekueche.de/smoe%2540geruechtekueche.de/adressen/592DA267-54FD6CDF-35723803.vcf.vcf
    ....
    
  • developer

    Oh, I see. It’s not related to the UID, but the file name.

    The file name contains https%3A…, which has been normalized to https://… and was then taken as a relative path instead of an absolute one.

    As a workaround, you can of course change the file name so that it doesn’t contain an encoded URL.

  • developer

    Can you please provide full logs, i.e. with log.tag.Wire and log.tag.HttpClient set to VERBOSE so that I can reproduce the issue?


  • the logs in my initial post are collected by following the howto you provided. including the VERBOSE settings.
    What do you mean by Resource file name being an encoded URL? What is the Resource file name? I certainly hope you mean the UID.

  • developer

    the logs in my initial post are collected by following the howto you provided. including the VERBOSE settings.

    Assuming that you use a recent DAVdroid version – did you setprop log.tag.Wire VERBOSE and setprop log.tag.HttpClient VERBOSE in the adb shell? If you do, the whole network traffic will be logged which will be helpful in debugging this issue.

    What do you mean by Resource file name being an encoded URL? What is the Resource file name? I certainly hope you mean the UID.

    No, the resourcename is the file name where the VCard is stored (file name in the URL, of course it may be a database entry too). A VCard may be stored in your.collection/my.file.name.vcf and still have an UID of 12345. Often, the filename is UID.vcf, but that’s not a requirement.

    In your case, the file name is https%3A%2F%2Fsmoe%2540geruechtekueche.de%40cal.geruechtekueche.de%2Fsmoe%2540geruechtekueche.de%2Fadressen%2F592DA267-54FD6CDF-35723803.vcf.vcf, but the UID may be something other (I can’t see the UID without verbose logs).

  • developer

    @smoebody Can you please write to play@bitfire.at so that we can send a new APK for testing?


  • I was having the same issue and the commit appears to have fixed it for me.

Similar topics

  • 4
  • 5
  • 10