Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
0713f9b8
Commit
0713f9b8
authored
Apr 30, 2001
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
workaround for Collector #2196: Superuser could remove /Control_Panel
through webdav
parent
c6b199f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
lib/python/webdav/Collection.py
lib/python/webdav/Collection.py
+10
-2
No files found.
lib/python/webdav/Collection.py
View file @
0713f9b8
...
...
@@ -85,9 +85,9 @@
"""WebDAV support - collection objects."""
__version__
=
'$Revision: 1.1
8
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.1
9
$'
[
11
:
-
2
]
import
sys
,
os
,
string
,
Globals
,
davcmds
,
Lockable
import
sys
,
os
,
string
,
Globals
,
davcmds
,
Lockable
,
re
from
common
import
urlfix
,
rfc1123_date
from
Resource
import
Resource
from
AccessControl
import
getSecurityManager
...
...
@@ -144,6 +144,8 @@ class Collection(Resource):
may return either 200 (OK) or 204 (No Content) to indicate total
success, or may return 207 (Multistatus) to indicate partial
success. Note that in Zope a DELETE currently never returns 207."""
self
.
dav__init
(
REQUEST
,
RESPONSE
)
ifhdr
=
REQUEST
.
get_header
(
'If'
,
''
)
url
=
urlfix
(
REQUEST
[
'URL'
],
'DELETE'
)
...
...
@@ -151,6 +153,12 @@ class Collection(Resource):
parent
=
self
.
aq_parent
user
=
getSecurityManager
().
getUser
()
token
=
None
if
re
.
match
(
"/Control_Panel"
,
REQUEST
[
'PATH_INFO'
]):
RESPONSE
.
setStatus
(
403
)
RESPONSE
.
setHeader
(
'Content-Type'
,
'text/xml; charset="utf-8"'
)
return
RESPONSE
# Level 1 of lock checking (is the collection or its parent locked?)
if
Lockable
.
wl_isLocked
(
self
):
if
ifhdr
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment