File tree Expand file tree Collapse file tree 3 files changed +1
-6
lines changed
Expand file tree Collapse file tree 3 files changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -244,7 +244,6 @@ GOTRUE_LOG_LEVEL="debug"
244244GOTRUE_SECURITY_REFRESH_TOKEN_ROTATION_ENABLED = " false"
245245GOTRUE_SECURITY_REFRESH_TOKEN_REUSE_INTERVAL = " 0"
246246GOTRUE_SECURITY_UPDATE_PASSWORD_REQUIRE_REAUTHENTICATION = " false"
247- GOTRUE_SECURITY_TIMING_OBFUSCATION_DELAY = " 0"
248247GOTRUE_SECURITY_UPDATE_PASSWORD_REQUIRE_CURRENT_PASSWORD = " false"
249248GOTRUE_OPERATOR_TOKEN = " unused-operator-token"
250249GOTRUE_RATE_LIMIT_HEADER = " X-Forwarded-For"
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ package api
33import (
44 "context"
55 "net/http"
6- "time"
76
87 "github.com/gofrs/uuid"
98
@@ -40,11 +39,9 @@ const InvalidLoginMessage = "Invalid login credentials"
4039const dummyPasswordHash = "$2a$10$JUbiChr4qVqzEEHDLbRmgOvGTUajEl0g6JJjOzN.drbF9oX.iL/sq"
4140
4241// performDummyPasswordVerification prevents user enumeration via timing attacks
42+ // by performing a bcrypt comparison even when user is not found
4343func (a * API ) performDummyPasswordVerification (ctx context.Context , password string ) {
4444 _ = crypto .CompareHashAndPassword (ctx , dummyPasswordHash , password )
45- if delayMs := a .config .Security .TimingObfuscationDelay ; delayMs > 0 {
46- time .Sleep (time .Duration (delayMs ) * time .Millisecond )
47- }
4845}
4946
5047// Token is the endpoint for OAuth access token requests
Original file line number Diff line number Diff line change @@ -731,7 +731,6 @@ type SecurityConfiguration struct {
731731 UpdatePasswordRequireReauthentication bool `json:"update_password_require_reauthentication" split_words:"true"`
732732 UpdatePasswordRequireCurrentPassword bool `json:"update_password_require_current_password" split_words:"true" default:"false"`
733733 ManualLinkingEnabled bool `json:"manual_linking_enabled" split_words:"true" default:"false"`
734- TimingObfuscationDelay int `json:"timing_obfuscation_delay" split_words:"true" default:"0"`
735734
736735 DBEncryption DatabaseEncryptionConfiguration `json:"database_encryption" split_words:"true"`
737736}
You can’t perform that action at this time.
0 commit comments