mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-11-29 08:56:03 +00:00
CLASS is an optional field, don't set it to PUBLIC
As specified in RFC5545 the CLASS field is optional, and if it isn't present is treated as PUBLIC. To allow a is-not-defined prop-filter to find resources without CLASS set, we need to not store in the database. This turns out to be okay, because to enforce privacy we always check to see if it is PRIVATE or CONFIDENTIAL. We never check to see if it is PUBLIC. Closes #284.
This commit is contained in:
1 parent
4a380b12a2
commit
149ec3555f
8 files changed
+171
-21
No files matched your search
@@ -180,11 +180,7 @@ class WritableCollection extends DAVResource {
|
||||
$calitem_params[':dtstamp'] = $dtstamp;
|
||||
|
||||
$class = $first->GetPValue('CLASS');
|
||||
/*
|
||||
* It seems that some calendar clients don't set a class...
|
||||
* RFC2445, 4.8.1.3: Default is PUBLIC
|
||||
*/
|
||||
if ( $this->IsPublicOnly() || !isset($class) || $class == '' ) {
|
||||
if ( $this->IsPublicOnly() && isset($class)) {
|
||||
$class = 'PUBLIC';
|
||||
}
|
||||
$calitem_params[':class'] = $class;
|
||||
|
||||
Reference in new issue
Block a user