Problem/Motivation

We have encountered illegal links to PDF files on our site, which runs on Drupal 7.56. The links have the following structure:
https://www.oursite.com/system/files/livestream_barcelona_gegen_real_mad...

We couldn't find any trace of the file in our database or on the server.

The site is a job application site and we use entityforms for applicants to upload files with their application. The applicants do not have to be logged in/registered. So the upload works for anonymous users and uses the public file system.

We use the filefield_paths module to configure the file paths, create a file alias with a sha256 hash and use the ACL module for field visibility and permissions. The files however are stored in the public file system - a fact which currently cannot be altered.

This issue seems to be related to https://www.drupal.org/psa-2016-003 but we do not use webforms but entityforms.

I have also come across this issue on the Google Webmaster Central Help Forum: https://productforums.google.com/forum/#!topic/webmasters/HAIjN-0aJMw

For us it is completely unclear how to replicate the issue and find the problem. Any help would be highly appreciated.

Proposed resolution

We do not know whether this is a bug or misconfiguraton on our site. Any suggestions on how we could approach that problem would be highly appreciated.

Comments

criscom created an issue. See original summary.

wildmandmc’s picture

it's possible that a upload permission is set to anyone. i would go check all permissions.

criscom’s picture

Hi wildmandmc,

Everyone is allowed to attach a file to an application, s/he applies to. So yes, the upload permissions are set to anyone and this is required.

Whenever someone uploads a file the file path looks like this:
https://www.oursite.com/sites/default/path/path/1ca04c9e22a52fd54b4916e6...

wildmandmc’s picture

something else you could do. anonymous users is type of file ext allowed.

criscom’s picture

Project: Drupal core » Profile2
Version: 7.56 »
Component: file system » Code

I have found the issue. It occurs on a Profile2 Upload field which is integrated in on the register page. This upload field was configured to take advantage of the private file system. It features an Ajax upload button which allows to upload a fiel to the server without submitting the form. Unfortunately the private file path was configured so that uploaded files are visible to the public.

I wonder if that Ajax upload button can be de-activated and how. Any suggestions? Thanks a lot.

criscom’s picture

Title: PDF hack » De-activate Ajax upload
criscom’s picture

criscom’s picture

criscom’s picture

criscom’s picture

Project: Profile2 » Profile 2
Version: » 7.x-1.1
Status: Active » Closed (won't fix)