From d94893f9a64e6e2e5af9971d569550bacb172061 Mon Sep 17 00:00:00 2001 From: Daniel <845765@qq.com> Date: Fri, 30 Jun 2023 09:33:04 +0800 Subject: [PATCH] :art: The captcha on the auth page uses a white background Fix https://github.com/siyuan-note/siyuan/issues/8645 --- app/stage/auth.html | 2 +- kernel/model/session.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/stage/auth.html b/app/stage/auth.html index cb64f6231..38b3cc41d 100644 --- a/app/stage/auth.html +++ b/app/stage/auth.html @@ -187,7 +187,7 @@

{{.workspace}}


- +
diff --git a/kernel/model/session.go b/kernel/model/session.go index 420c5306c..4a5ebc65b 100644 --- a/kernel/model/session.go +++ b/kernel/model/session.go @@ -17,6 +17,7 @@ package model import ( + "image/color" "net/http" "net/url" "os" @@ -118,6 +119,7 @@ func GetCaptcha(c *gin.Context) { options.CharPreset = "ABCDEFGHKLMNPQRSTUVWXYZ23456789" options.Noise = 0.5 options.CurveNumber = 0 + options.BackgroundColor = color.White }) if nil != err { logging.LogErrorf("generates captcha failed: " + err.Error())