fix: resolve variable naming conflict in ALTCHA challenge handlers

This commit is contained in:
Patrick Britton 2026-02-16 23:33:31 -06:00
parent 7944380ada
commit 11e8b30122
3 changed files with 7 additions and 6 deletions

View file

@ -4140,9 +4140,9 @@ func (h *AdminHandler) GetAltchaChallenge(c *gin.Context) {
challenge := fmt.Sprintf("%x", sha256.Sum256([]byte(salt)))[:10]
// Create HMAC signature using JWT secret as the key
h := hmac.New(sha256.New, []byte(h.jwtSecret))
h.Write([]byte(challenge + salt))
signature := hex.EncodeToString(h.Sum(nil))
mac := hmac.New(sha256.New, []byte(h.jwtSecret))
mac.Write([]byte(challenge + salt))
signature := hex.EncodeToString(mac.Sum(nil))
response := map[string]interface{}{
"algorithm": "SHA-256",

View file

@ -606,9 +606,9 @@ func (h *AuthHandler) GetAltchaChallenge(c *gin.Context) {
challenge := fmt.Sprintf("%x", sha256.Sum256([]byte(salt)))[:10]
// Create HMAC signature using JWT secret as the key
h := hmac.New(sha256.New, []byte(h.config.JWTSecret))
h.Write([]byte(challenge + salt))
signature := hex.EncodeToString(h.Sum(nil))
mac := hmac.New(sha256.New, []byte(h.config.JWTSecret))
mac.Write([]byte(challenge + salt))
signature := hex.EncodeToString(mac.Sum(nil))
response := map[string]interface{}{
"algorithm": "SHA-256",

View file

@ -1,4 +1,5 @@
# Miscellaneous
*.sql
*.class
*.log
*.pyc