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: use valid query parameters for postgres (#4515)
Amir Ehsandarc0643ff6fa03
diff --git a/store/db/postgres/memo_filter.go b/store/db/postgres/memo_filter.goindex ee6d78f8d..b405d5dc3 100644--- a/store/db/postgres/memo_filter.go+++ b/store/db/postgres/memo_filter.go@@ -130,11 +130,8 @@ func (d *DB) ConvertExprToSQL(ctx *filter.ConvertContext, expr *exprv1.Expr) errreturn errors.New("invalid int value")}- var factor string- if identifier == "creator_id" {- factor = "memo.creator_id"- }- if _, err := ctx.Buffer.WriteString(fmt.Sprintf("%s %s ?", factor, operator)); err != nil {+ factor := "memo.creator_id"+ if _, err := ctx.Buffer.WriteString(fmt.Sprintf("%s %s %s", factor, operator, placeholder(len(ctx.Args)+ctx.ArgsOffset+1))); err != nil {return err}ctx.Args = append(ctx.Args, valueInt)