Compare commits
No commits in common. "1958b44115ff7d15ef5a5156d1cddc1d9ac36917" and "8c56cfc8984c28214bee262c0632d05a06fff1ef" have entirely different histories.
1958b44115
...
8c56cfc898
4 changed files with 7 additions and 5 deletions
|
@ -12,8 +12,6 @@ linters:
|
||||||
- structcheck
|
- structcheck
|
||||||
- exhaustivestruct
|
- exhaustivestruct
|
||||||
- nosnakecase
|
- nosnakecase
|
||||||
- gomnd
|
|
||||||
- execinquery
|
|
||||||
# Too extremist/unusable
|
# Too extremist/unusable
|
||||||
- depguard
|
- depguard
|
||||||
- varnamelen
|
- varnamelen
|
||||||
|
|
4
go.sum
4
go.sum
|
@ -10,7 +10,11 @@ github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0=
|
||||||
github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
|
github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=
|
||||||
github.com/redis/go-redis/v9 v9.5.1 h1:H1X4D3yHPaYrkL5X06Wh6xNVM/pX0Ft4RV0vMGvLBh8=
|
github.com/redis/go-redis/v9 v9.5.1 h1:H1X4D3yHPaYrkL5X06Wh6xNVM/pX0Ft4RV0vMGvLBh8=
|
||||||
github.com/redis/go-redis/v9 v9.5.1/go.mod h1:hdY0cQFCN4fnSYT6TkisLufl/4W5UIXyv0b/CLO2V2M=
|
github.com/redis/go-redis/v9 v9.5.1/go.mod h1:hdY0cQFCN4fnSYT6TkisLufl/4W5UIXyv0b/CLO2V2M=
|
||||||
|
golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30=
|
||||||
|
golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M=
|
||||||
golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI=
|
golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI=
|
||||||
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
|
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
|
||||||
|
golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
|
||||||
|
golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||||
golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
|
golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
|
||||||
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||||
|
|
|
@ -99,7 +99,7 @@ func VerifyPassword(password string, hash string) (bool, error) {
|
||||||
// parseHash parse existing encoded argon2id string.
|
// parseHash parse existing encoded argon2id string.
|
||||||
func parseHash(source string) (argon2idHash, config, error) {
|
func parseHash(source string) (argon2idHash, config, error) {
|
||||||
separateItem := strings.Split(source, "$")
|
separateItem := strings.Split(source, "$")
|
||||||
if len(separateItem) != 6 { //nolint:mnd
|
if len(separateItem) != 6 { //nolint:gomnd
|
||||||
return argon2idHash{}, config{}, &parseError{message: "Hash format is not valid"}
|
return argon2idHash{}, config{}, &parseError{message: "Hash format is not valid"}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ func parseHash(source string) (argon2idHash, config, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
separateParam := strings.Split(separateItem[3], ",")
|
separateParam := strings.Split(separateItem[3], ",")
|
||||||
if len(separateParam) != 3 { //nolint:mnd
|
if len(separateParam) != 3 { //nolint:gomnd
|
||||||
return argon2idHash{}, config{}, &parseError{message: "Hash config is not valid"}
|
return argon2idHash{}, config{}, &parseError{message: "Hash config is not valid"}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ func parseIntBeforeSeparator(source *string, sep string) (int, error) { // retur
|
||||||
return 0, &parseIntBeforeSeparatorError{message: *source + ": format only take positive value"}
|
return 0, &parseIntBeforeSeparatorError{message: *source + ": format only take positive value"}
|
||||||
}
|
}
|
||||||
|
|
||||||
if value > 99 { //nolint:mnd
|
if value > 99 { //nolint:gomnd
|
||||||
return 0, &parseIntBeforeSeparatorError{message: *source + ": Format only take two number"}
|
return 0, &parseIntBeforeSeparatorError{message: *source + ": Format only take two number"}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue