Skip to content

Panic on nil pointer to driver.Valuer interface #248

Description

@titanproger

panic when insert or update nil poiter to type wich implements Valuer interface

for example

type record struct {
SomeRelationUuid *uuid.uuid db:"some_relation_uuid"
}

the problem in vendor/github.com/gocraft/dbr/v2/interpolate.go encodePlaceholder

if valuer, ok := value.(driver.Valuer); ok

this code checks is interface implements Valuer - but not check is interface has valid value

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions