Explorar el Código

Fix double-generation of scratch token (#6832) (#6833)

tags/v1.9.0-rc1
SagePtr hace 5 años
padre
commit
59f879bfec
Se han modificado 1 ficheros con 1 adiciones y 5 borrados
  1. 1
    5
      models/twofactor.go

+ 1
- 5
models/twofactor.go Ver fichero

@@ -129,11 +129,7 @@ func aesDecrypt(key, text []byte) ([]byte, error) {

// NewTwoFactor creates a new two-factor authentication token.
func NewTwoFactor(t *TwoFactor) error {
_, err := t.GenerateScratchToken()
if err != nil {
return err
}
_, err = x.Insert(t)
_, err := x.Insert(t)
return err
}


Cargando…
Cancelar
Guardar