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.
Go dockerfossgomarkdownmemomicroblognote-takingnotesopen-sourceown-your-datareactself-hostedsqlitetimeline
fix: pin memos of other people (#1870)
CorrectRoadH30fae208c2af
diff --git a/server/memo.go b/server/memo.goindex 3477ef857..d42f919c6 100644--- a/server/memo.go+++ b/server/memo.go@@ -368,6 +368,17 @@ func (s *Server) registerMemoRoutes(g *echo.Group) {if !ok {return echo.NewHTTPError(http.StatusUnauthorized, "Missing user in session")}++ memo, err := s.Store.GetMemo(ctx, &store.FindMemoMessage{+ ID: &memoID,+ })+ if err != nil {+ return echo.NewHTTPError(http.StatusInternalServerError, "Failed to find memo").SetInternal(err)+ }+ if memo.CreatorID != userID {+ return echo.NewHTTPError(http.StatusUnauthorized, "Unauthorized")+ }+memoOrganizerUpsert := &api.MemoOrganizerUpsert{}if err := json.NewDecoder(c.Request().Body).Decode(memoOrganizerUpsert); err != nil {return echo.NewHTTPError(http.StatusBadRequest, "Malformatted post memo organizer request").SetInternal(err)