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

reading numeric values from the json data is broken #6

Description

@butonic

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/ldapserver@v0.0.0-20191209092749-8fb2e7a4a628/pkg/ldap/route.go:166 +0xd6
github.com/butonic/ldapserver/pkg/ldap.(*conn).ProcessRequestMessage(0xc00028c120, 0xc00000e480)
        /home/jfd/go/pkg/mod/github.com/butonic/ldapserver@v0.0.0-20191209092749-8fb2e7a4a628/pkg/ldap/connection.go:315 +0x1c7
created by github.com/butonic/ldapserver/pkg/ldap.(*conn).serve
        /home/jfd/go/pkg/mod/github.com/butonic/ldapserver@v0.0.0-20191209092749-8fb2e7a4a628/pkg/ldap/connection.go:233 +0x5b2

Workaround: put numbers in quotes in the json data file

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions