Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

fix: unescape filename (#158)

boojacke54ff5ec9e22
diff --git a/server/webhook.go b/server/webhook.go
index 975f7cb9c..89cf51202 100644
--- a/server/webhook.go
+++ b/server/webhook.go
@@ -2,6 +2,7 @@ package server
import (
"fmt"
+ "html"
"net/http"
"strconv"
@@ -22,7 +23,7 @@ func (s *Server) registerWebhookRoutes(g *echo.Group) {
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("ID is not a number: %s", c.Param("resourceId"))).SetInternal(err)
}
- filename := c.Param("filename")
+ filename := html.UnescapeString(c.Param("filename"))
resourceFind := &api.ResourceFind{
ID: &resourceID,
Filename: &filename,