Introduce new global variable to control maximum size of carddav resources.

This commit is contained in:
“Paul committed 2018-08-30 17:23:12 +02:00
1 parent 9a430130d8
commit c5891abc7f
4 files changed
+14 -1

No files matched your search

+11
View File
@@ -171,6 +171,17 @@ $c->admin_email ='calendar-admin@example.com';
// $c->home_calendar_name = 'calendar'; // $c->home_calendar_name = 'calendar';
// $c->home_addressbook_name = 'addresses'; // $c->home_addressbook_name = 'addresses';
/**
* Sets a numeric value indicating the maximum size in octets (bytes) of a resource
* that the server is willing to accept when an address object resource is stored
* in an address book collection (e.g. contacts with image attachments).
* Note that not all clients respect that property and that DAViCal won't deny creating
* or updating a resource that is larger than the specified limit if the client willingly or
* unwillingly ignores that property. Currently (late 2018) we only know of iOS devices to handle it properly.
* Default: 6550000
*/
// $c->carddav_max_resource_size = 6550000;
/** /**
* If the above options are not suitable for your new users, use this to create * If the above options are not suitable for your new users, use this to create
* a more complex default collection management. * a more complex default collection management.
+1
View File
@@ -83,6 +83,7 @@ $c->permission_scan_depth = 2;
$c->expand_pdo_parameters = true; $c->expand_pdo_parameters = true;
$c->home_calendar_name = 'calendar'; $c->home_calendar_name = 'calendar';
$c->home_addressbook_name = 'addresses'; $c->home_addressbook_name = 'addresses';
$c->carddav_max_resource_size = 6550000;
$c->enable_row_linking = true; $c->enable_row_linking = true;
$c->enable_scheduling = false; $c->enable_scheduling = false;
$c->http_auth_mode = 'Basic'; $c->http_auth_mode = 'Basic';
+1 -1
View File
@@ -1842,7 +1842,7 @@ EOQRY;
case 'urn:ietf:params:xml:ns:carddav:max-resource-size': case 'urn:ietf:params:xml:ns:carddav:max-resource-size':
if ( ! $this->_is_collection || !$this->_is_addressbook ) return false; if ( ! $this->_is_collection || !$this->_is_addressbook ) return false;
$reply->NSElement($prop, $tag, '' ); $reply->NSElement($prop, $tag, $c->carddav_max_resource_size );
break; break;
case 'urn:ietf:params:xml:ns:carddav:supported-address-data': case 'urn:ietf:params:xml:ns:carddav:supported-address-data':
+1
View File
@@ -83,6 +83,7 @@ $c->permission_scan_depth = 2;
$c->expand_pdo_parameters = true; $c->expand_pdo_parameters = true;
$c->home_calendar_name = 'calendar'; $c->home_calendar_name = 'calendar';
$c->home_addressbook_name = 'addresses'; $c->home_addressbook_name = 'addresses';
$c->carddav_max_resource_size = 6550000;
$c->enable_row_linking = true; $c->enable_row_linking = true;
$c->enable_scheduling = false; $c->enable_scheduling = false;
$c->http_auth_mode = 'Basic'; $c->http_auth_mode = 'Basic';