|
@@ -503,8 +503,8 @@ func registrationCallbackErrorText(config *Config, client *Client, err error) st
|
503
|
503
|
}
|
504
|
504
|
}
|
505
|
505
|
|
506
|
|
-// validatePassphrase checks whether a passphrase is allowed by our rules
|
507
|
|
-func validatePassphrase(passphrase string) error {
|
|
506
|
+// ValidatePassphrase checks whether a passphrase is allowed by our rules
|
|
507
|
+func ValidatePassphrase(passphrase string) error {
|
508
|
508
|
// sanity check the length
|
509
|
509
|
if len(passphrase) == 0 || len(passphrase) > 300 {
|
510
|
510
|
return errAccountBadPassphrase
|
|
@@ -1122,7 +1122,7 @@ func (am *AccountManager) NsSendpass(client *Client, accountName string) (err er
|
1122
|
1122
|
}
|
1123
|
1123
|
|
1124
|
1124
|
func (am *AccountManager) NsResetpass(client *Client, accountName, code, password string) (err error) {
|
1125
|
|
- if validatePassphrase(password) != nil {
|
|
1125
|
+ if ValidatePassphrase(password) != nil {
|
1126
|
1126
|
return errAccountBadPassphrase
|
1127
|
1127
|
}
|
1128
|
1128
|
account, err := am.LoadAccount(accountName)
|
|
@@ -2181,7 +2181,7 @@ func (ac *AccountCredentials) SetPassphrase(passphrase string, bcryptCost uint)
|
2181
|
2181
|
return nil
|
2182
|
2182
|
}
|
2183
|
2183
|
|
2184
|
|
- if validatePassphrase(passphrase) != nil {
|
|
2184
|
+ if ValidatePassphrase(passphrase) != nil {
|
2185
|
2185
|
return errAccountBadPassphrase
|
2186
|
2186
|
}
|
2187
|
2187
|
|