Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
03a9ef33
Commit
03a9ef33
authored
Dec 09, 2020
by
Kirill Smelkov
2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
X wcfs: Remove credentials from zurl when computing wcfs mountpoint
parent
bb40185b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
wcfs/__init__.py
wcfs/__init__.py
+10
-0
No files found.
wcfs/__init__.py
View file @
03a9ef33
...
...
@@ -74,6 +74,7 @@ from golang.gcompat import qq
from
persistent
import
Persistent
from
zodbtools.util
import
ashex
as
h
from
six.moves.urllib.parse
import
urlsplit
,
urlunsplit
from
.client._wcfs
import
\
PyWCFS
as
_WCFS
,
\
...
...
@@ -297,6 +298,15 @@ def _wcfs_exe():
#
# it also makes sure the mountpoint exists.
def
_mntpt_4zurl
(
zurl
):
# remove credentials from zurl.
# The same database can be accessed from different clients with different
# credentials, but we want to map them all to the same single WCFS
# instance.
scheme
,
netloc
,
path
,
query
,
frag
=
urlsplit
(
zurl
)
if
'@'
in
netloc
:
netloc
=
netloc
[
netloc
.
index
(
'@'
)
+
1
:]
zurl
=
urlunsplit
((
scheme
,
netloc
,
path
,
query
,
frag
))
m
=
hashlib
.
sha1
()
m
.
update
(
zurl
)
...
...
Kirill Smelkov
@kirr
mentioned in commit
58e2a88c
·
Oct 27, 2021
mentioned in commit
58e2a88c
mentioned in commit 58e2a88c7261ddeefb603bff6ffb2dcd9468bc86
Toggle commit list
Kirill Smelkov
@kirr
mentioned in commit
e3f2ee2d
·
Oct 28, 2021
mentioned in commit
e3f2ee2d
mentioned in commit e3f2ee2d7f18d5718817fd3a6e098b126946bbbc
Toggle commit list
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