diff options
author | Alex Auvolat <alex@adnab.me> | 2020-01-27 16:39:08 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-01-27 16:39:08 +0100 |
commit | e7ded9d6b575870a17ce58f0192cc388984dfb4a (patch) | |
tree | d1fd9fae3b1c32cb6d656b9145e61c9d88ead4b9 | |
parent | dce432426e325ab43757da9485c612421c912957 (diff) | |
download | bottin-e7ded9d6b575870a17ce58f0192cc388984dfb4a.tar.gz bottin-e7ded9d6b575870a17ce58f0192cc388984dfb4a.zip |
Fix slice bounds
-rw-r--r-- | main.go | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -357,7 +357,7 @@ func (server *Server) objectExists(dn string) (bool, error) { func (server *Server) checkSuffix(dn string, allow_extend bool) (string, error) { suffix := server.config.Suffix if len(dn) < len(suffix) { - if dn != suffix[-len(dn):] || !allow_extend { + if dn != suffix[len(suffix)-len(dn):] || !allow_extend { return suffix, fmt.Errorf( "Only handling stuff under DN %s", suffix) } |