Skip to content

Commit 3550033

Browse files
authored
check if list.id is nil (#264)
id list can get into a weird state where we fail to download the actual ids but a new idList object is created with ids = nil and can panic
1 parent c2f5f08 commit 3550033

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

evaluator.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ func (e *evaluator) evalCondition(user User, cond configCondition, depth int, co
705705
inlist := false
706706
if reflect.TypeOf(cond.TargetValue).String() == "string" && reflect.TypeOf(value).String() == "string" {
707707
list := e.store.getIDList(castToString(cond.TargetValue))
708-
if list != nil {
708+
if list != nil && list.ids != nil {
709709
h := sha256.Sum256([]byte(castToString(value)))
710710
_, inlist = list.ids.Load(base64.StdEncoding.EncodeToString(h[:])[:8])
711711
}

0 commit comments

Comments
 (0)