Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: The captcha on the auth page uses a white background Fix https://github.com/siyuan-note/siyuan/issues/8645

Danield94893f9a64e
diff --git a/app/stage/auth.html b/app/stage/auth.html
index cb64f62314..38b3cc41d6 100644
--- a/app/stage/auth.html
+++ b/app/stage/auth.html
@@ -187,7 +187,7 @@
<h1 style="margin-bottom: 48px;color:var(--b3-theme-on-background)">{{.workspace}}</h1>
<input class="b3-text-filed" id="authCode" type="password" placeholder="{{.l0}}"/><br>
<div style="position: relative;width: 240px;margin: 8px auto 0;display: none">
- <img id="captchaImg" style="top: 1px;position: absolute;height: 28px;right: 1px;cursor: pointer">
+ <img id="captchaImg" style="top: 1px;position: absolute;height: 27px;right: 1px;cursor: pointer">
<input id="captcha" class="b3-text-filed" placeholder="{{.l3}}">
</div>
<button class="b3-button" onclick="submitAuth()">{{.l1}}</button>
diff --git a/kernel/model/session.go b/kernel/model/session.go
index 420c5306c8..4a5ebc65b4 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())