ome / bioformats

Bio-Formats is a Java library for reading and writing data in life sciences image file formats. It is developed by the Open Microscopy Environment. Bio-Formats is released under the GNU General Public License (GPL); commercial licenses are available from Glencoe Software.
https://www.openmicroscopy.org/bio-formats
GNU General Public License v2.0
371 stars 241 forks source link

parseOptions strips characters after "]" #4127

Open CFGrote opened 6 months ago

CFGrote commented 6 months ago

Bioformats version 7.0.1

This bug report is related to ImageSc post https://forum.image.sc/t/omero-fiji-plugin-error-invalid-image-id/89470/11.

In brief, the fiji-omero plugin reports an error (loci.formats.FormatException: Invalid image ID) when opening an image from our institute's omero. this issue was observed by some users but not by all.

Attaching jdb to a running Fiji process, I narrowed it down to the following:

Stopping in bioformats' loci.plugins.in.Importer.parseOptions(), line 127

print arg

"location=[OMERO] open=[omero:server=ome.evolbio.mpg.de
user=grotec
port=4064
pass=XXXXX]YYYYYYY
groupID=3
iid=36540] view=Hyperstack windowless=false crop=false "

Note the password: It has a "]", likely closing the opening "[" after "open=".

Then, in line 132:

print options.getId()

options.getId() = "omero:server=ome.evolbio.mpg.de
user=grotec
port=4064
pass=XXXXX"

So somewhere in between, everything after the "]" in my password must have been stripped away, including the Image ID, causing the exception in the Fiji plugin.

I hope this can be fixed.

Something else that strikes me is that passwords seem to be passed as plain text, but is this really necessary? Shouldn't the image id be all that is needed to query the image and send it to Fiji? But maybe there are other use cases where this information is actually needed.

imagesc-bot commented 6 months ago

This issue has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/omero-fiji-plugin-error-invalid-image-id/89470/12

joshmoore commented 6 months ago

Oh wow 👏🏽

dominikl commented 6 months ago

Thank you very much @CFGrote . I'm surprised that this is handed down to and fails at the Bioformats level, as all the authentication and transfer is done on the OMERO level.