]> Cypherpunks.ru repositories - govpn.git/blobdiff - src/cypherpunks.ru/govpn/verifier.go
Check that verifier is provided for client
[govpn.git] / src / cypherpunks.ru / govpn / verifier.go
index a452a50a84737231a2e0e3d28701dee10138bf23..15955e77a2cf65e35ab18172d638a677170a3200 100644 (file)
@@ -73,7 +73,7 @@ func (v *Verifier) PasswordApply(password string) *[ed25519.PrivateKeySize]byte
 // Parse either short or long verifier form.
 func VerifierFromString(input string) (*Verifier, error) {
        s := strings.Split(input, "$")
-       if !(len(s) != 4 || len(s) != 5) || s[1] != "argon2d" {
+       if len(s) < 4 || s[1] != "argon2d" {
                return nil, errors.New("Invalid verifier structure")
        }
        var m, t, p int