From b03dbfcf27a4e3ae55971843b6f4685b6787b2f1 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Tue, 28 Feb 2023 09:20:43 +0800 Subject: [PATCH 1/2] =?UTF-8?q?:lock:=20API=20token=20=E7=BB=95=E8=BF=87?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C=E6=BC=8F=E6=B4=9E=20Fix=20https://github.com?= =?UTF-8?q?/siyuan-note/siyuan/issues/7507?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/session.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/kernel/model/session.go b/kernel/model/session.go index 5e54ddfb2..53ba90f58 100644 --- a/kernel/model/session.go +++ b/kernel/model/session.go @@ -204,7 +204,7 @@ func CheckAuth(c *gin.Context) { } } - if strings.HasSuffix(c.Request.RequestURI, "/check-auth") { + if "/check-auth" == c.Request.URL.Path { // 跳过访问授权页 c.Next() return } @@ -228,11 +228,5 @@ func CheckAuth(c *gin.Context) { return } - if u := c.Query("url"); "" != u { - c.Redirect(302, u) - c.Abort() - return - } - c.Next() } From 31738cacf6695d4b081f6dd1948b194010514a6d Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Tue, 28 Feb 2023 09:47:34 +0800 Subject: [PATCH 2/2] =?UTF-8?q?:bug:=20=E7=94=9F=E6=88=90=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=8E=86=E5=8F=B2=E7=B4=A2=E5=BC=95=E6=8A=A5=E9=94=99?= =?UTF-8?q?=20Fix=20https://github.com/siyuan-note/siyuan/issues/7509?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/sql/database.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sql/database.go b/kernel/sql/database.go index 39b4d6e42..e9e592f9c 100644 --- a/kernel/sql/database.go +++ b/kernel/sql/database.go @@ -215,7 +215,7 @@ func initHistoryDBConnection() { historyDB.Close() } - dsn := util.DBPath + "?_journal_mode=WAL" + + dsn := util.HistoryDBPath + "?_journal_mode=WAL" + "&_synchronous=OFF" + "&_mmap_size=2684354560" + "&_secure_delete=OFF" +