From 0e500ec05bf9227b66b28a480b40e0936241d953 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Besson?= Date: Wed, 25 Sep 2024 18:59:53 +0100 Subject: [PATCH] omero.HdfStorage.update: add size check on data.rowNumbers Currently if the omero.grid.Data passed to table.update() has rowNumbers values outside the range of rows, the implementation will raise an IndexError which will be returned as an InternalException to the client. This commit adds an initial call to self.__sizecheck(None, data.rowNumbers) which should raise an ApiUsageException with an appropriate error message in that scenario. --- src/omero/hdfstorageV2.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/omero/hdfstorageV2.py b/src/omero/hdfstorageV2.py index ca3283dd4..0f97f72ad 100755 --- a/src/omero/hdfstorageV2.py +++ b/src/omero/hdfstorageV2.py @@ -526,6 +526,7 @@ def append(self, cols): @modifies def update(self, stamp, data): self.__initcheck() + self.__sizecheck(None, data.rowNumbers) if data: for i, rn in enumerate(data.rowNumbers): for col in data.columns: