Security
Headlines
HeadlinesLatestCVEs

Headline

CVE-2023-1538: update VerifyCaptcha · answerdev/answer@813ad0b

Observable Timing Discrepancy in GitHub repository answerdev/answer prior to 1.0.6.

CVE
#git

@@ -16,6 +16,7 @@ import (

type CaptchaRepo interface {

SetCaptcha(ctx context.Context, key, captcha string) (err error)

GetCaptcha(ctx context.Context, key string) (captcha string, err error)

DelCaptcha(ctx context.Context, key string) (err error)

SetActionType(ctx context.Context, ip, actionType string, amount int) (err error)

GetActionType(ctx context.Context, ip, actionType string) (amount int, err error)

DelActionType(ctx context.Context, ip, actionType string) (err error)

@@ -143,6 +144,12 @@ func (cs *CaptchaService) GenerateCaptcha(ctx context.Context) (key, captchaBase

func (cs *CaptchaService) VerifyCaptcha(ctx context.Context, key, captcha string) (isCorrect bool, err error) {

realCaptcha, err := cs.captchaRepo.GetCaptcha(ctx, key)

if err != nil {

log.Error("VerifyCaptcha GetCaptcha Error", err.Error())

return false, nil

}

err = cs.captchaRepo.DelCaptcha(ctx, key)

if err != nil {

log.Error("VerifyCaptcha DelCaptcha Error", err.Error())

return false, nil

}

return strings.TrimSpace(captcha) == realCaptcha, nil

Related news

GHSA-rvjp-8qj4-8p29: Answer has Observable Timing Discrepancy

Observable Timing Discrepancy in GitHub repository answerdev/answer prior to 1.0.6.

CVE: Latest News

CVE-2023-50976: Transactions API Authorization by oleiman · Pull Request #14969 · redpanda-data/redpanda
CVE-2023-6905
CVE-2023-6903
CVE-2023-6904
CVE-2023-3907