Harden WebDAV contact backend by checking for etag being NULL
authorTobias Mueller <tobiasmue@gnome.org>
Sun, 31 May 2009 23:10:03 +0000 (01:10 +0200)
committerTobias Mueller <tobiasmue@gnome.org>
Sun, 31 May 2009 23:10:03 +0000 (01:10 +0200)
Fixes bug 559980.

addressbook/backends/webdav/e-book-backend-webdav.c

index 7c087c9..c6aaef5 100644 (file)
@@ -720,7 +720,7 @@ download_contacts(EBookBackendWebdav *webdav, EFlag *running,
 
                contact = e_book_backend_cache_get_contact(priv->cache, complete_uri);
                /* download contact if it is not cached or its ETag changed */
-               if (contact == NULL ||
+               if (contact == NULL || etag == NULL ||
                                strcmp(e_contact_get_const(contact, E_CONTACT_REV),etag) != 0) {
                        contact = download_contact(webdav, complete_uri);
                        if (contact != NULL) {