kopia lustrzana https://github.com/reiver/greatape
fix(components): 🐛 resolve case sensitivity issue
rodzic
c9addad9ad
commit
51959fb83e
|
@ -1,6 +1,8 @@
|
||||||
package core
|
package core
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/reiver/greatape/app/commands"
|
"github.com/reiver/greatape/app/commands"
|
||||||
"github.com/reiver/greatape/app/validators"
|
"github.com/reiver/greatape/app/validators"
|
||||||
. "github.com/reiver/greatape/components/constants"
|
. "github.com/reiver/greatape/components/constants"
|
||||||
|
@ -360,6 +362,9 @@ func (manager *spiManager) Signup(username string, email string, password string
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
username = strings.ToLower(username)
|
||||||
|
email = strings.ToLower(email)
|
||||||
|
|
||||||
editor.Lock(SIGNUP_REQUEST)
|
editor.Lock(SIGNUP_REQUEST)
|
||||||
defer editor.Unlock(SIGNUP_REQUEST)
|
defer editor.Unlock(SIGNUP_REQUEST)
|
||||||
|
|
||||||
|
@ -400,6 +405,8 @@ func (manager *spiManager) ResendVerificationCode(email string, editor Identity)
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
email = strings.ToLower(email)
|
||||||
|
|
||||||
editor.Lock(RESEND_VERIFICATION_CODE_REQUEST)
|
editor.Lock(RESEND_VERIFICATION_CODE_REQUEST)
|
||||||
defer editor.Unlock(RESEND_VERIFICATION_CODE_REQUEST)
|
defer editor.Unlock(RESEND_VERIFICATION_CODE_REQUEST)
|
||||||
|
|
||||||
|
@ -440,6 +447,8 @@ func (manager *spiManager) Verify(email string, token string, code string, edito
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
email = strings.ToLower(email)
|
||||||
|
|
||||||
editor.Lock(VERIFY_REQUEST)
|
editor.Lock(VERIFY_REQUEST)
|
||||||
defer editor.Unlock(VERIFY_REQUEST)
|
defer editor.Unlock(VERIFY_REQUEST)
|
||||||
|
|
||||||
|
@ -490,6 +499,8 @@ func (manager *spiManager) Login(email string, password string, editor Identity)
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
email = strings.ToLower(email)
|
||||||
|
|
||||||
editor.Lock(LOGIN_REQUEST)
|
editor.Lock(LOGIN_REQUEST)
|
||||||
defer editor.Unlock(LOGIN_REQUEST)
|
defer editor.Unlock(LOGIN_REQUEST)
|
||||||
|
|
||||||
|
@ -682,6 +693,8 @@ func (manager *spiManager) ResetPassword(usernameOrEmail string, editor Identity
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
usernameOrEmail = strings.ToLower(usernameOrEmail)
|
||||||
|
|
||||||
editor.Lock(RESET_PASSWORD_REQUEST)
|
editor.Lock(RESET_PASSWORD_REQUEST)
|
||||||
defer editor.Unlock(RESET_PASSWORD_REQUEST)
|
defer editor.Unlock(RESET_PASSWORD_REQUEST)
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue