Commit 85168e58 authored by Nicolas Pernoud's avatar Nicolas Pernoud
Browse files

fix: edge case with content length on encrypted webdavs

parent 8aa1bc6c
Pipeline #6677 passed with stages
in 2 minutes and 49 seconds
......@@ -178,3 +178,12 @@ a.navbar-item.is-active {
width: 95%;
max-height: 95%;
}
.modal-card-head .delete {
transition: 0.2s;
}
.modal-card-head .delete:hover {
background-color: $nice-red;
transform: scale(1.1);
}
......@@ -468,6 +468,7 @@ func decryptFile(filePath string, key []byte) http.Handler {
func getTrueSize(stream *sio.Stream, header streamHeader, encSize int64) (int64, error) {
overhead := stream.Overhead(0)
encSize = encSize - int64(header.binarySize())
size := encSize / int64(sio.BufSize+overhead) * int64(sio.BufSize)
if mod := encSize % int64(sio.BufSize+overhead); mod > 0 {
if mod < overhead {
......@@ -475,7 +476,6 @@ func getTrueSize(stream *sio.Stream, header streamHeader, encSize int64) (int64,
}
size += mod - overhead
}
size -= int64(header.binarySize())
return size, nil
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -32,7 +32,7 @@
<div class="navbar-brand">
<div class="navbar-item">
<a class="button is-primary is-rounded is-outlined" href="https://www.github.com/nicolaspernoud/Vestibule" target="_blank" rel="noopener noreferrer">
<span>4.3.36</span>
<span>4.3.37</span>
<span class="icon">
<svg
class="svg-inline--fa fa-github fa-w-16"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment