forked from Deuxfleurs/bottin
Fix slice bounds
This commit is contained in:
parent
dce432426e
commit
e7ded9d6b5
1 changed files with 1 additions and 1 deletions
2
main.go
2
main.go
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue