Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

reading numeric values from the json data is broken #6

Open
butonic opened this issue Dec 10, 2019 · 0 comments
Open

reading numeric values from the json data is broken #6

butonic opened this issue Dec 10, 2019 · 0 comments

Comments

@butonic
Copy link
Member

butonic commented Dec 10, 2019

needed to safeguard against json with a numeric value, eg for the uidNumber property.

Otherwise leads to

panic: interface conversion: interface {} is float64, not string

goroutine 7 [running]:
github.com/owncloud/ocis-devldap/pkg/server/ldap.(*Handler).Search(0xc000342138, 0x1a36820, 0xc0000727c0, 0xc00000e860)
        /home/jfd/Repositories/ocis-devldap/pkg/server/ldap/handler.go:159 +0x1115
github.com/butonic/ldapserver/pkg/ldap.(*RouteMux).ServeLDAP(0xc00033bda0, 0x1a36820, 0xc0000727c0, 0xc00000e860)
        /home/jfd/go/pkg/mod/github.com/butonic/[email protected]/pkg/ldap/route.go:166 +0xd6
github.com/butonic/ldapserver/pkg/ldap.(*conn).ProcessRequestMessage(0xc00028c120, 0xc00000e480)
        /home/jfd/go/pkg/mod/github.com/butonic/[email protected]/pkg/ldap/connection.go:315 +0x1c7
created by github.com/butonic/ldapserver/pkg/ldap.(*conn).serve
        /home/jfd/go/pkg/mod/github.com/butonic/[email protected]/pkg/ldap/connection.go:233 +0x5b2

Workaround: put numbers in quotes in the json data file

@butonic butonic changed the title reading numeric values in json are a broker reading numeric values from the json data is brokn Dec 10, 2019
@butonic butonic changed the title reading numeric values from the json data is brokn reading numeric values from the json data is broken Dec 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant