|
@@ -71,7 +71,7 @@ func LoginAuth(c *gin.Context) {
|
|
}
|
|
}
|
|
inputCaptcha = captchaArg.(string)
|
|
inputCaptcha = captchaArg.(string)
|
|
|
|
|
|
- if session.Captcha != inputCaptcha {
|
|
|
|
|
|
+ if strings.ToLower(session.Captcha) != strings.ToLower(inputCaptcha) {
|
|
ret.Code = 1
|
|
ret.Code = 1
|
|
ret.Msg = Conf.Language(22)
|
|
ret.Msg = Conf.Language(22)
|
|
return
|
|
return
|
|
@@ -109,10 +109,9 @@ func LoginAuth(c *gin.Context) {
|
|
|
|
|
|
func GetCaptcha(c *gin.Context) {
|
|
func GetCaptcha(c *gin.Context) {
|
|
img, err := captcha.New(100, 26, func(options *captcha.Options) {
|
|
img, err := captcha.New(100, 26, func(options *captcha.Options) {
|
|
- options.CharPreset = "abcdefghjkmnpqrtuvwxyz2346789"
|
|
|
|
|
|
+ options.CharPreset = "ABCDEFGHKLMNPQRSTUVWXYZ23456789"
|
|
options.Noise = 0.5
|
|
options.Noise = 0.5
|
|
options.CurveNumber = 0
|
|
options.CurveNumber = 0
|
|
- options.FontScale = 1.2
|
|
|
|
})
|
|
})
|
|
if nil != err {
|
|
if nil != err {
|
|
util.LogErrorf("generates captcha failed: " + err.Error())
|
|
util.LogErrorf("generates captcha failed: " + err.Error())
|