Skip Navigation

[Resolved] How can I safely save form-update files?

This thread is resolved. Here is a description of the problem and solution.

Problem:

The main issue here is that the user wanted a way to protect their file directory from access using a direct link to the file.

Solution:
My best advice to secure your uploads folder is to use the plugin below.
https://wordpress.org/plugins/prevent-direct-access/

This plugin will block direct access to the files from guest users and only the authors and admin of the files can access it.

This support ticket is created 3 years, 6 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 5 replies, has 2 voices.

Last updated by lotharK 3 years, 6 months ago.

Assisted by: Shane.

Author
Posts
#2095611

The users of the website can apply online. They send various files with their application. CV, passport photo, etc.
The form saves the files in the library. The data is easily accessible here for everyone via easy-to-guess paths.
Is there a way to store this data more securely?

I found this thread about a very similar problem: https://toolset.com/de/forums/topic/gdpr-save-location-for-cred-file-uploads-do-not-attach-files-to-the-email/. Unfortunately, I was unable to derive a specific solution from this.
Can you give me a tip on how to deal with the situation?

Thank you in advance!

#2096033

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Lothar,

Thank you for getting touch.

My best advice to secure your uploads folder is to use the plugin below.
https://wordpress.org/plugins/prevent-direct-access/

This plugin will block direct access to the files from guest users and only the authors and admin of the files can access it.

Please let me know this helps.
Thanks,
Shane

#2096375

Hi Shane,

Thank you for your quick answer.

The plugin looks fine, but it seems that the files need to be manually protected in the library after they have been uploaded.
The installation instruction says:
...
... Activate the plugin.
... Protect your files under the Media Library.

The files can be protected afterwards, which is not a bad thing, but not directly when uploading. Or am I missing something?

Many thanks for your effort!

#2096985

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Lothar,

I'm not sure what you mean when uploading ? Once the file is in the media library it should get protected.

Can you explain a bit more by what is meant by "when uploading".

Thanks,
Shane

#2097569

Hi Shane,

it is guests who use the form. They upload files (e.g. their CV or copies of certificates).
These files end up in the upload directory. There they are unprotected. Anyone who can guess the path can view the files.

The plugin you recommended can protect these files. To do this, I have to go to the media library after the files have been uploaded, select the files to be protected and click on "protect".
It cannot be configured that all files uploaded by the plugin are automatically protected.
Or am I missing something here?

I have now found another solution. The "File Renaming on Upload" plugin (hidden link) renames the files during the upload. In my case, it adds the date, time, and microseconds of the upload. This creates filenames and paths that are difficult to guess.

It would be even more ideal if a random sequence of characters were appended. Wouldn't that be an easy to implement feature in the Toolset Forms plugin? In order to make the updates much more secure from unauthorized access and thus certainly more compatible with GDPR guidelines?

Thank you for your help and have a good day!
Lothar

#2097573

My issue is resolved now. Thank you!