3drepo / 3drepobouncer

A C++ library providing 3D Repo Scene Graph definition, repository management logic and manipulation logic. It is is essentially the refactored 3DRepoCore and (parts of) 3DRepoGUI
GNU Affero General Public License v3.0
29 stars 13 forks source link

A new error code for model import failures due to encrypted file #667

Closed carmenfan closed 3 months ago

carmenfan commented 7 months ago

Description

Occasionally we get files (we've seen it on nwds, dwgs) that are encrypted and thus cannot import: image

These are currently returning error code 5, but we should make a new error code to show it's a problem user can address.

Goals

Tasks

TBC

sebjf commented 4 months ago

I have made the changes for NWDs and added a unit test.

For DWGs, support for password protection was removed in 2016 and Autodesk will not provide a version earlier than 2017.

I tried this application which did successfully protect a file. However, while ODA can open it if password protection is not enabled, when it is enabled ODA fails with the code fail, and not bad_password or encrypted_file.

sebjf commented 4 months ago

I also exported a password protected DWG from this sample but we get the same response.

It seems the OdDgnExport class is not reporting the error correctly. The OdaDgnApp sample also fails the same way.

Looking at the forums, support for encrypted files is explicitly not supported, as Bently doesn't want them to be? 😕 : https://forum.opendesign.com/showthread.php?21521-How-to-open-v8-dgn-with-password

sebjf commented 4 months ago

Detection of password protected DWGs and the new error code have been added in #679. That branch has been merged into this one and encrypted NWD detection added. #679 must be merged before this branch.

carmenfan commented 3 months ago

merged into #679