Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Łukasz Nowak
slapos
Commits
dc5330c5
Commit
dc5330c5
authored
Nov 11, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
software/dufs: fix misconfiguration preventing uploading in /pub
This have been a regression when upgrading to v0.40.0
parent
9e1071da
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
14 deletions
+16
-14
software/dufs/buildout.hash.cfg
software/dufs/buildout.hash.cfg
+1
-1
software/dufs/instance.cfg.in
software/dufs/instance.cfg.in
+1
-1
software/dufs/test/test.py
software/dufs/test/test.py
+14
-12
No files found.
software/dufs/buildout.hash.cfg
View file @
dc5330c5
...
...
@@ -15,4 +15,4 @@
[instance.cfg.in]
filename = instance.cfg.in
md5sum =
c1c5db680dee5cfe5334cedae4b7fc51
md5sum =
765bb15f322f5566a66d15baa8c68f9a
software/dufs/instance.cfg.in
View file @
dc5330c5
...
...
@@ -159,7 +159,7 @@ command-line =
--render-try-index
--allow-all
--auth-method basic
--auth ${admin-password:user}:${admin-password:passwd-sha512-crypt}@/:rw
--auth ${admin-password:user}:${admin-password:passwd-sha512-crypt}@/:rw
,/pub:rw
--auth @/pub
--tls-cert ${dufs-certificate:cert-file}
--tls-key ${dufs-certificate:key-file}
...
...
software/dufs/test/test.py
View file @
dc5330c5
...
...
@@ -139,15 +139,17 @@ class TestFileServer(SlapOSInstanceTestCase):
self
.
assertEqual
(
resp
.
status_code
,
requests
.
codes
.
unauthorized
)
def
test_upload_file
(
self
):
for
path
in
'hello.txt'
,
'pub/hello.txt'
,
'create/intermediate/paths'
:
with
self
.
subTest
(
path
):
resp
=
requests
.
put
(
urllib
.
parse
.
urljoin
(
self
.
connection_parameters
[
'upload-url'
],
'hello.txt'
),
urllib
.
parse
.
urljoin
(
self
.
connection_parameters
[
'upload-url'
],
path
),
data
=
io
.
BytesIO
(
b'hello'
),
verify
=
self
.
ca_cert
,
)
self
.
assertEqual
(
resp
.
status_code
,
requests
.
codes
.
created
)
resp
=
requests
.
get
(
urllib
.
parse
.
urljoin
(
self
.
connection_parameters
[
'upload-url'
],
'hello.txt'
),
urllib
.
parse
.
urljoin
(
self
.
connection_parameters
[
'upload-url'
],
path
),
verify
=
self
.
ca_cert
,
)
self
.
assertEqual
(
resp
.
text
,
'hello'
)
...
...
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