fix: resolve variable naming conflict in ALTCHA challenge handlers
This commit is contained in:
parent
7944380ada
commit
11e8b30122
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
1
sojorn_app/.gitignore
vendored
1
sojorn_app/.gitignore
vendored
|
|
@ -1,4 +1,5 @@
|
|||
# Miscellaneous
|
||||
*.sql
|
||||
*.class
|
||||
*.log
|
||||
*.pyc
|
||||
|
|
|
|||
Loading…
Reference in a new issue