Local files deletion and bugs, more bugs and potential security flaws
Posted: Fri Dec 01, 2023 1:24 am
I am trying to facilitate the search and removal of local files from the user vault view.
The point is to remove greyed out folder and the remains of cached files that were moved in another folder or renamed by another PDM client. I would like to make some quick link to unique folder paths containing local only files to allow the user a quick deletion.
In our test server I added the "local file search" to the RMB menu, launch the search and the local file list to add to the vault is shown. Until here everything is ok.
Since I want to delete the data in the local file search dialog, I export the file list as csv and open it in excel. It opens ok.
To speed up the deletion of local files I made an hyperlink out of the list path for each file with =HYPERLINK(CELL) in the column next to the path exported from PDM. The link to the folder is created, but it opens as a normal folder not a PDM one.
If you log off from PDM you can jump into the local cache bypassing the login screen and tamper with your local vault view files... Those links work as intended if you use =HYPERLINK(CELL)&"\" appending a backslash at the end of the exported path.
Another way to access the local vault view raw files needs to simply append a "/" (slash without quotes) at the end of your path in the PDM explorer: all the folders turn gray and the local data is visible again...from the PDM explorer interface. (Check in and check out are greyed out) At least this one still requires login to see the folder content. (It works on a Japanese localized OS at least, it does not work on the root folder of the vault)
In this mode you cannot see which file is local only or a checked in file cache or a private status one, so you could end up deleting everything and not only local files.
I already knew that using a file manager like totalcommander or similar, and the command prompt you could access the local vault view in "raw mode", but I think it is a bit complicated for the average user, while a mistype or a simple command in excel would allow a plausible deniability for potential malicious intent.
I am trying to understand what can be done if the local cache is altered. In theory not much.
Deleting cached files (already checked in) seems to delete only the local cache on the PDM client.
This is expected behaviour and it is not a concern.
Same for folder, every folder inside the vault could be deleted as it is shown as grey, but the server seem smart enought to delete only the local cache of the client and not the server side.
Deleting a checked out file make deleted in the recycle bin by default, the database still see the file inside the folder when opening explorer in pdm mode, but checkin is not possible as no local file is present. This could potentially lead to data loss depending on how the file is deleted.
Copy and pasting some random data renamed as SLDPRT and overwriting a checkout file local cache, will not allow check in. Removing the read only flag and editing the file makes it a newer file version even without edit rights, but no check in is possible.
Other ideas on what to check? Or potential risks of tampering with a local cache?
The point is to remove greyed out folder and the remains of cached files that were moved in another folder or renamed by another PDM client. I would like to make some quick link to unique folder paths containing local only files to allow the user a quick deletion.
In our test server I added the "local file search" to the RMB menu, launch the search and the local file list to add to the vault is shown. Until here everything is ok.
Since I want to delete the data in the local file search dialog, I export the file list as csv and open it in excel. It opens ok.
To speed up the deletion of local files I made an hyperlink out of the list path for each file with =HYPERLINK(CELL) in the column next to the path exported from PDM. The link to the folder is created, but it opens as a normal folder not a PDM one.
If you log off from PDM you can jump into the local cache bypassing the login screen and tamper with your local vault view files... Those links work as intended if you use =HYPERLINK(CELL)&"\" appending a backslash at the end of the exported path.
Another way to access the local vault view raw files needs to simply append a "/" (slash without quotes) at the end of your path in the PDM explorer: all the folders turn gray and the local data is visible again...from the PDM explorer interface. (Check in and check out are greyed out) At least this one still requires login to see the folder content. (It works on a Japanese localized OS at least, it does not work on the root folder of the vault)
In this mode you cannot see which file is local only or a checked in file cache or a private status one, so you could end up deleting everything and not only local files.
I already knew that using a file manager like totalcommander or similar, and the command prompt you could access the local vault view in "raw mode", but I think it is a bit complicated for the average user, while a mistype or a simple command in excel would allow a plausible deniability for potential malicious intent.
I am trying to understand what can be done if the local cache is altered. In theory not much.
Deleting cached files (already checked in) seems to delete only the local cache on the PDM client.
This is expected behaviour and it is not a concern.
Same for folder, every folder inside the vault could be deleted as it is shown as grey, but the server seem smart enought to delete only the local cache of the client and not the server side.
Deleting a checked out file make deleted in the recycle bin by default, the database still see the file inside the folder when opening explorer in pdm mode, but checkin is not possible as no local file is present. This could potentially lead to data loss depending on how the file is deleted.
Copy and pasting some random data renamed as SLDPRT and overwriting a checkout file local cache, will not allow check in. Removing the read only flag and editing the file makes it a newer file version even without edit rights, but no check in is possible.
Other ideas on what to check? Or potential risks of tampering with a local cache?