From 74a559b1a0b6d1b2d970c96ad90e755876f6f125 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Tue, 9 Jan 2024 17:11:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96WAF=E9=AA=8C=E8=AF=81?= =?UTF-8?q?=E7=A0=81=E8=BE=93=E5=85=A5=E6=A1=86=E5=92=8C=E5=AD=97=E4=BD=93?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/waf/captcha_validator.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/internal/waf/captcha_validator.go b/internal/waf/captcha_validator.go index 4e79b0e..253107d 100644 --- a/internal/waf/captcha_validator.go +++ b/internal/waf/captcha_validator.go @@ -182,6 +182,7 @@ func (this *CaptchaValidator) showVerifyCodesForm(actionConfig *CaptchaAction, r var msgPrompt string var msgButtonTitle string var msgRequestId string + var msgPlaceholder string switch lang { case "en-US": @@ -189,16 +190,19 @@ func (this *CaptchaValidator) showVerifyCodesForm(actionConfig *CaptchaAction, r msgPrompt = "Input verify code above:" msgButtonTitle = "Verify Yourself" msgRequestId = "Request ID" + msgPlaceholder = "" case "zh-CN": msgTitle = "身份验证" msgPrompt = "请输入上面的验证码" msgButtonTitle = "提交验证" msgRequestId = "请求ID" + msgPlaceholder = "点此输入" case "zh-TW": msgTitle = "身份驗證" msgPrompt = "請輸入上面的驗證碼" msgButtonTitle = "提交驗證" msgRequestId = "請求ID" + msgPlaceholder = "點此輸入" default: msgTitle = "Verify Yourself" msgPrompt = "Input verify code above:" @@ -240,7 +244,7 @@ func (this *CaptchaValidator) showVerifyCodesForm(actionConfig *CaptchaAction, r

` + msgPrompt + `

- +
@@ -271,7 +275,7 @@ func (this *CaptchaValidator) showVerifyCodesForm(actionConfig *CaptchaAction, r var isValidated=!1;window.addEventListener("pageshow",function(){isValidated&&window.location.reload()}),null!=window.addEventListener&&(document.addEventListener("DOMContentLoaded",function(){document.getElementById("ui-captcha-image").addEventListener("load",function(){var e=document.getElementById("ui-captcha-image-prompt");e.parentNode.removeChild(e)})}),window.addEventListener("load",function(){document.getElementById("GOEDGE_WAF_CAPTCHA_CODE").focus();var e=document.getElementById("captcha-form");null!=e&&e.addEventListener("submit",function(){isValidated=!0})}));