Skip to content

Commit 33e95eb

Browse files
author
Hayim.Shaul@ibm.com
committed
PutBindings: check for too many ephemeral ids
Signed-off-by: Hayim.Shaul@ibm.com <hayimsha@fhe3.haifa.ibm.com>
1 parent b9790bb commit 33e95eb

File tree

1 file changed

+3
-0
lines changed
  • platform/view/services/storage/driver/sql/common

1 file changed

+3
-0
lines changed

platform/view/services/storage/driver/sql/common/binding.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ func (db *BindingStore) PutBindings(ctx context.Context, longTerm view.Identity,
9494
if len(ephemerals) == 0 {
9595
return nil
9696
}
97+
if len(ephemerals) > 1000 {
98+
return errors.Errorf("Too many ephemerals (%d). Max allowed is 1000", len(ephemerals))
99+
}
97100
if longTerm == nil {
98101
return nil
99102
}

0 commit comments

Comments
 (0)