Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Nextcloud
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Nextcloud
Commits
85f2e737
Commit
85f2e737
authored
12 years ago
by
Lukas Reschke
Browse files
Options
Downloads
Patches
Plain Diff
Disable listening, instead checking the ACL to prevent DoS
parent
11895a86
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
apps/calendar/appinfo/remote.php
+5
-6
5 additions, 6 deletions
apps/calendar/appinfo/remote.php
apps/contacts/appinfo/remote.php
+4
-7
4 additions, 7 deletions
apps/contacts/appinfo/remote.php
with
9 additions
and
13 deletions
apps/calendar/appinfo/remote.php
+
5
−
6
View file @
85f2e737
...
...
@@ -21,22 +21,21 @@ $principalBackend = new OC_Connector_Sabre_Principal();
$caldavBackend
=
new
OC_Connector_Sabre_CalDAV
();
// Root nodes
$nodes
=
array
(
new
Sabre_CalDAV_Principal_Collection
(
$principalBackend
),
$collection
=
new
Sabre_CalDAV_Principal_Collection
(
$principalBackend
);
$collection
->
disableListing
=
true
;
// Disable listening
$nodes
=
array
(
$collection
,
new
Sabre_CalDAV_CalendarRootNode
(
$principalBackend
,
$caldavBackend
),
);
);
// Fire up server
$server
=
new
Sabre_DAV_Server
(
$nodes
);
$server
->
setBaseUri
(
$baseuri
);
// Add plugins
$aclPlugin
=
new
Sabre_DAVACL_Plugin
();
$aclPlugin
->
hideNodesFromListings
=
true
;
$server
->
addPlugin
(
$aclPlugin
);
$server
->
addPlugin
(
new
Sabre_DAV_Auth_Plugin
(
$authBackend
,
'ownCloud'
));
$server
->
addPlugin
(
new
Sabre_CalDAV_Plugin
());
$server
->
addPlugin
(
new
Sabre_DAVACL_Plugin
());
$server
->
addPlugin
(
new
Sabre_DAV_Browser_Plugin
(
false
));
// Show something in the Browser, but no upload
$server
->
addPlugin
(
new
Sabre_CalDAV_ICSExportPlugin
());
// And off we go!
$server
->
exec
();
This diff is collapsed.
Click to expand it.
apps/contacts/appinfo/remote.php
+
4
−
7
View file @
85f2e737
...
...
@@ -36,19 +36,16 @@ $principalBackend = new OC_Connector_Sabre_Principal();
$carddavBackend
=
new
OC_Connector_Sabre_CardDAV
();
// Root nodes
$nodes
=
array
(
new
Sabre_CalDAV_Principal_Collection
(
$principalBackend
),
$collection
=
new
Sabre_CalDAV_Principal_Collection
(
$principalBackend
);
$collection
->
disableListing
=
true
;
// Disable listening
$nodes
=
array
(
$collection
,
new
Sabre_CardDAV_AddressBookRoot
(
$principalBackend
,
$carddavBackend
),
);
);
// Fire up server
$server
=
new
Sabre_DAV_Server
(
$nodes
);
$server
->
setBaseUri
(
$baseuri
);
// Add plugins
$aclPlugin
=
new
Sabre_DAVACL_Plugin
();
$aclPlugin
->
hideNodesFromListings
=
true
;
$server
->
addPlugin
(
$aclPlugin
);
$server
->
addPlugin
(
new
Sabre_DAV_Auth_Plugin
(
$authBackend
,
'ownCloud'
));
$server
->
addPlugin
(
new
Sabre_CardDAV_Plugin
());
$server
->
addPlugin
(
new
Sabre_DAVACL_Plugin
());
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment