Skip to content

📚 The open-source, offline-first Notion, Obsidian & Confluence alternative. Advanced Markdown, multi-tenant teams, OIDC/SSO, and local S3 backups. Deploy in one command.

Fix security issue

Smaug673973c4693fef7f
diff --git a/cdn/main.go b/cdn/main.go
index 98024a15..fe977599 100644
--- a/cdn/main.go
+++ b/cdn/main.go
@@ -5,6 +5,7 @@ import (
"log"
"net/http"
"os"
+ "path"
"strings"
"github.com/gorilla/handlers"
@@ -47,15 +48,7 @@ func securityHeadersMiddleware(next http.Handler) http.Handler {
func secureFileServer(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- // Validation du chemin pour prévenir la traversée de répertoires
- cleanPath := cleanPath(r.URL.Path)
- r.URL.Path = cleanPath
+ r.URL.Path = path.Clean(r.URL.Path)
next.ServeHTTP(w, r)
})
}
-
-func cleanPath(path string) string {
- // Nettoyage basique du chemin pour éviter la traversée de répertoires
- cleanPath := strings.Replace(path, "..", "", -1)
- return cleanPath
-}
diff --git a/frontend/public/Alexandrie.svg b/frontend/public/Alexandrie-logo-dark.svg
similarity index 100%
rename from frontend/public/Alexandrie.svg
rename to frontend/public/Alexandrie-logo-dark.svg
diff --git a/frontend/public/Alexandrie-logo-light.svg b/frontend/public/Alexandrie-logo-light.svg
new file mode 100644
index 00000000..7de3c084
--- /dev/null
+++ b/frontend/public/Alexandrie-logo-light.svg
@@ -0,0 +1,7 @@
+
+<svg xmlns="http://www.w3.org/2000/svg" width="500" height="500" viewBox="0 0 164 160">
+ <g transform="translate(0.000000,160.000000) scale(0.100000,-0.100000)" fill="#334155" stroke="none">
+ <path d="M688 1190 c-21 -16 -243 -392 -313 -529 -35 -70 15 -151 94 -151 39 0 87 30 236 146 124 97 256 135 352 101 24 -8 41 -12 39 -8 -72 136 -246 427 -264 441 -34 27 -110 27 -144 0z"/>
+ <path d="M921 729 c-24 -4 -64 -18 -89 -30 -36 -18 -42 -24 -31 -33 8 -6 51 -38 94 -72 44 -33 90 -66 102 -72 86 -46 189 41 152 129 -23 57 -138 96 -228 78z"/>
+ </g>
+</svg>
diff --git a/frontend/public/Alexandrie.png b/frontend/public/Alexandrie.png
deleted file mode 100644
index 31aa3664..00000000
Binary files a/frontend/public/Alexandrie.png and /dev/null differ