diff options
author | Alex Auvolat <alex@adnab.me> | 2020-02-02 13:32:12 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-02-02 13:32:12 +0100 |
commit | 4c037dcb94d2c663da9e624ba44dac0f833bc804 (patch) | |
tree | 4a110c2ccb999f0b343da98402273c67fe8cdc1f /util.go | |
parent | e9e7a4cb4bdf0a1fe0356d465f8becac49b46320 (diff) | |
download | bottin-4c037dcb94d2c663da9e624ba44dac0f833bc804.tar.gz bottin-4c037dcb94d2c663da9e624ba44dac0f833bc804.zip |
Bug fix: case-insensitive value match (except for passwords)
Diffstat (limited to 'util.go')
-rw-r--r-- | util.go | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -138,3 +138,11 @@ func genUuid() string { } return uuid.String() } + +func valueMatch(attr, val1, val2 string) bool { + if strings.EqualFold(attr, ATTR_USERPASSWORD) { + return val1 == val2 + } else { + return strings.EqualFold(val1, val2) + } +} |