Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: DAViCal: General

trouble with external links

 

 

DAViCal general RSS feed   Index | Next | Previous | View Threaded


steinberg at ibr

Jan 4, 2012, 7:22 AM

Post #1 of 3 (313 views)
Permalink
trouble with external links

Today I tried to set up an "external link" like this:

curl --basic --user 'steinb' -X BIND -H 'Content-Type: text/xml;charset="UTF-8"' --url 'https://www.ibr.cs.tu-bs.de/davical/caldav.php/steinb/' -d '<?xml version="1.0" encoding="utf-8"?><bind xmlns="DAV:"><segment>Schulferien 11-12</segment><href>http://www.sunbird-kalender.de/extension/kalender/Schulferien_2011-2012_NI.ics</href></bind>'

This request always gave an "<bind-source-exists/>The BIND Request MUST identify an existing resource." error. After modifying the if-clause in caldav-BIND.php around line 51 that differentiates internal from external hrefs to just

if ( preg_match ( '{^https?://[A-Za-z][^/]*/.+$}', $href ) ) {

it seems to work as expected.


------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Davical-general mailing list
Davical-general [at] lists
https://lists.sourceforge.net/lists/listinfo/davical-general


steinberg at ibr

Apr 27, 2012, 8:35 AM

Post #2 of 3 (236 views)
Permalink
Re: trouble with external links [In reply to]

Hi Andrew,

after a period of inactivity on this issue, today I tried again to use BIND for external calendars by two accounts on the same external URL. I found that something like this was needed to make it work somehow.

salvator:/usr/share/davical/inc# diff -u caldav-GET.php-orig caldav-GET.php
--- caldav-GET.php-orig 2011-09-11 13:46:40.000000000 +0200
+++ caldav-GET.php 2012-04-27 17:10:09.000000000 +0200
@@ -16,6 +16,7 @@
$dav_resource = new DAVResource($request->path);
$dav_resource->NeedPrivilege( array('urn:ietf:params:xml:ns:caldav:read-free-busy','DAV::read') );
if ( $dav_resource->IsExternal() ) {
+ require_once("external-fetch.php");
update_external ( $dav_resource );
}

salvator:/usr/share/davical/inc# diff -u caldav-BIND.php-orig caldav-BIND.php
--- caldav-BIND.php-orig 2012-04-27 17:09:21.000000000 +0200
+++ caldav-BIND.php 2012-04-27 17:31:01.000000000 +0200
@@ -55,7 +55,7 @@
$qry = new AwlQuery( );
$qry->QDo('SELECT collection_id FROM collection WHERE dav_name = :dav_name ', array( ':dav_name' => '/.external/'. md5($href) ));
if ( $qry->rows() == 1 && ($row = $qry->Fetch()) ) {
- $dav_id = $row->dav_id;
+ $dav_id = $row->collection_id;
}
else {
create_external ( '/.external/'. md5($href) ,true,false );


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Davical-general mailing list
Davical-general [at] lists
https://lists.sourceforge.net/lists/listinfo/davical-general


andrew at morphoss

May 14, 2012, 1:31 AM

Post #3 of 3 (212 views)
Permalink
Re: trouble with external links [In reply to]

Thanks Frank,

Both fixes have been applied to my tree now.

Regards,
Andrew.

On Fri, 2012-04-27 at 17:35 +0200, Frank Steinberg wrote:
> Hi Andrew,
>
> after a period of inactivity on this issue, today I tried again to use BIND for external calendars by two accounts on the same external URL. I found that something like this was needed to make it work somehow.
>
> salvator:/usr/share/davical/inc# diff -u caldav-GET.php-orig caldav-GET.php
> --- caldav-GET.php-orig 2011-09-11 13:46:40.000000000 +0200
> +++ caldav-GET.php 2012-04-27 17:10:09.000000000 +0200
> @@ -16,6 +16,7 @@
> $dav_resource = new DAVResource($request->path);
> $dav_resource->NeedPrivilege( array('urn:ietf:params:xml:ns:caldav:read-free-busy','DAV::read') );
> if ( $dav_resource->IsExternal() ) {
> + require_once("external-fetch.php");
> update_external ( $dav_resource );
> }
>
> salvator:/usr/share/davical/inc# diff -u caldav-BIND.php-orig caldav-BIND.php
> --- caldav-BIND.php-orig 2012-04-27 17:09:21.000000000 +0200
> +++ caldav-BIND.php 2012-04-27 17:31:01.000000000 +0200
> @@ -55,7 +55,7 @@
> $qry = new AwlQuery( );
> $qry->QDo('SELECT collection_id FROM collection WHERE dav_name = :dav_name ', array( ':dav_name' => '/.external/'. md5($href) ));
> if ( $qry->rows() == 1 && ($row = $qry->Fetch()) ) {
> - $dav_id = $row->dav_id;
> + $dav_id = $row->collection_id;
> }
> else {
> create_external ( '/.external/'. md5($href) ,true,false );
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Davical-general mailing list
> Davical-general [at] lists
> https://lists.sourceforge.net/lists/listinfo/davical-general
>

--
------------------------------------------------------------------------
andrew (AT) morphoss (DOT) com +64(272)DEBIAN
divorce, n:
A change of wife.
------------------------------------------------------------------------
Attachments: signature.asc (0.82 KB)

DAViCal general RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.