Bug #9524

Action digitalobject/view matches different information object if paths are the same

Added by Jesús García Crespo almost 6 years ago. Updated almost 5 years ago.

Status:NewStart date:03/03/2016
Priority:MediumDue date:
Assignee:-% Done:


Category:Digital object
Target version:-
Google Code Legacy ID: Tested version:
Sponsored:No Requires documentation:


  • Create two information objects belonging to the same repository
  • Upload same digital object with same filename

You would end up with a collision of URIs for the two digital objects, e.g.

When the user opens that page, DigitalObjectViewAction will populate the corresponding information object based on the path:

$pathinfo = pathinfo($request->getPathInfo());
$pathinfo['dirname'] = str_replace("/{$request->module}/{$request->action}", '', $pathinfo['dirname']).'/';
$this->resource = QubitDigitalObject::getByPathFile($pathinfo['dirname'], $pathinfo['basename']);

If we are matching a different information object the ACL checks won't take into account the rights assigned to the original information object. That's how we discovered this issue in first place.


#1 Updated by Mike Gale over 5 years ago

Using the checksum in the directory path for the digital objects is pretty important for doing data migrations. Often data migrations need 2-4 iterations to get everything right, and if the client has hundreds of GB of digital objects (which occasionally happens), re-importing digital objects every iteration becomes extremely time consuming. If we use the checksum in the directory path, we can match that with the digital object metadata and insert said metadata into the database without having to re-generate derivatives and the like.

I feel like we should display an error to the user if they try to import the exact same digital object more than once. It doesn't really make sense in real life to have the exact same photo twice in an archives. Even if you take a photo and photocopy it, the photo changes slightly due to scanning artefacts and imperfections. A checksum would never be the same for 2 photos that are separate physically, so I don't think it should in AtoM either.

#2 Updated by Jesús García Crespo over 5 years ago

  • Target version changed from Release 2.3.0 to Release 2.4.0

#3 Updated by Dan Gillean over 5 years ago

It would be wise to make this configurable, for testing environments. For example, when testing DIP upload from AM to AtoM, often the same sample transfer packages will be used over and over again. If the default did not allow this, but a user could set a flag in a config file for "test" or "dev" or something, this would be useful. Just a thought.

#4 Updated by Dan Gillean almost 5 years ago

  • Target version deleted (Release 2.4.0)

Also available in: Atom PDF