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
f8200c7b
Commit
f8200c7b
authored
Jul 20, 2006
by
Sidnei da Silva
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Fixup usage of urljoin in webdav.davcmds (a shame I missed the deadline to Zope 2.9.4)
parent
c8aa1d96
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
7 deletions
+18
-7
doc/CHANGES.txt
doc/CHANGES.txt
+7
-0
lib/python/webdav/common.py
lib/python/webdav/common.py
+5
-0
lib/python/webdav/davcmds.py
lib/python/webdav/davcmds.py
+6
-7
No files found.
doc/CHANGES.txt
View file @
f8200c7b
...
...
@@ -14,6 +14,13 @@ Zope Changes
to the rules for such a type laid out in the Python docs:
http://docs.python.org/api/supporting-cycle-detection.html
Zope 2.9.5 (unreleased)
Bugs fixed
- Usage of 'urljoin' in 'webdav.davcmds' could lead to wrongly
constructed urls.
Zope 2.9.4 (2006/07/21)
Bugs fixed
...
...
lib/python/webdav/common.py
View file @
f8200c7b
...
...
@@ -42,6 +42,11 @@ def absattr(attr):
return
attr
()
return
attr
def
urljoin
(
url
,
s
):
url
=
url
.
rstrip
(
'/'
)
s
=
s
.
lstrip
(
'/'
)
return
'/'
.
join
((
url
,
s
))
def
urlfix
(
url
,
s
):
n
=
len
(
s
)
if
url
[
-
n
:]
==
s
:
url
=
url
[:
-
n
]
...
...
lib/python/webdav/davcmds.py
View file @
f8200c7b
...
...
@@ -23,10 +23,9 @@ import transaction
from
AccessControl
import
getSecurityManager
from
Acquisition
import
aq_parent
from
OFS.PropertySheets
import
DAVProperties
from
ZConfig.url
import
urljoin
from
zExceptions
import
BadRequest
,
Forbidden
from
common
import
absattr
,
aq_base
,
urlfix
,
urlbase
from
common
import
absattr
,
aq_base
,
urlfix
,
urlbase
,
urljoin
from
common
import
isDavCollection
from
common
import
PreconditionFailed
from
interfaces
import
IWriteLock
...
...
@@ -170,8 +169,8 @@ class PropFind:
if
dflag
:
ob
.
_p_deactivate
()
elif
hasattr
(
ob
,
'__dav_resource__'
):
uri
=
urljoin
(
url
,
absattr
(
ob
.
id
))
depth
=
depth
==
'infinity'
and
depth
or
0
uri
=
urljoin
(
url
,
absattr
(
ob
.
getId
()
))
depth
=
depth
==
'infinity'
and
depth
or
0
self
.
apply
(
ob
,
uri
,
depth
,
result
,
top
=
0
)
if
dflag
:
ob
.
_p_deactivate
()
...
...
@@ -409,7 +408,7 @@ class Lock:
if
depth
==
'infinity'
and
iscol
:
for
ob
in
obj
.
objectValues
():
if
hasattr
(
obj
,
'__dav_resource__'
):
uri
=
urljoin
(
url
,
absattr
(
ob
.
id
))
uri
=
urljoin
(
url
,
absattr
(
ob
.
getId
()
))
self
.
apply
(
ob
,
creator
,
depth
,
token
,
result
,
uri
,
top
=
0
)
if
not
top
:
...
...
@@ -474,7 +473,7 @@ class Unlock:
if
hasattr
(
ob
,
'__dav_resource__'
)
and
\
(
IWriteLock
.
providedBy
(
ob
)
or
WriteLockInterface
.
isImplementedBy
(
ob
)):
uri
=
urljoin
(
url
,
absattr
(
ob
.
id
))
uri
=
urljoin
(
url
,
absattr
(
ob
.
getId
()
))
self
.
apply
(
ob
,
token
,
uri
,
result
,
top
=
0
)
if
not
top
:
return
result
...
...
@@ -529,7 +528,7 @@ class DeleteCollection:
for
ob
in
obj
.
objectValues
():
dflag
=
hasattr
(
ob
,
'_p_changed'
)
and
(
ob
.
_p_changed
==
None
)
if
hasattr
(
ob
,
'__dav_resource__'
):
uri
=
urljoin
(
url
,
absattr
(
ob
.
id
))
uri
=
urljoin
(
url
,
absattr
(
ob
.
getId
()
))
self
.
apply
(
ob
,
token
,
user
,
uri
,
result
,
top
=
0
)
if
dflag
:
ob
.
_p_deactivate
()
...
...
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