Zend certified PHP/Magento developer

Since 31/01/22 all the download files from Dropbox become corrupted on Magento 1.9.4.2

I own a Magento 1.9.4.2 store which has only downloadable products in it. Once a customer buy a digital product, Magento sends an email with the download link generated by Magento itself from the Dropbox one. This is worked since 2013 from 31/01/22. Suddenly, it doesn’t work anymore. All the download files, past and present, become corrupted once downloaded!

The Magento web server is Apache and in front of it there’s a Nginx reverse proxy.

I also tried to restore my store from a 20/01/22 backup, but nothing’s changed. It still doesn’t work!

I checked the file types:

Downloaded from Magento link [Corrupted]: application/octet-stream; charset=binary
Downloaded from Dropbox link [Ok]: application/zip; charset=binary

I checked the http response header and it says:

content-disposition: attachment; filename="testfile.zip"
content-type: application/zip

but, as I wrote, once downloaded the file type become application/octet-stream and the file is corrupted.

Here’s the curl output from the server itself:

root@magento /tmp# curl -I https://dl.dropboxusercontent.com/s/v2d3vm174biluk1/filetest.zip?dl=1

HTTP/2 200
accept-ranges: bytes
cache-control: max-age=60
content-disposition: attachment; filename="filetest.zip"; filename*=UTF-8''filetest.zip
content-security-policy: report-uri https://www.dropbox.com/csp_log?policy_name=blockserver-usercontent ; sandbox allow-forms allow-scripts allow-top-navigation allow-popups
content-security-policy: form-action 'none' ; report-uri https://www.dropbox.com/csp_log?policy_name=blockserver-noscript ; script-src 'none'
etag: 233d
pragma: public
set-cookie:  uc_session=uIn423ZW179jClyoN4r0YtVWgKogBVoLNoWNzXmy0qQPyWJZverGltTFPC2eLXUh; Domain=dropboxusercontent.com; HttpOnly; Path=/; Secure
x-content-type-options: nosniff
x-server-response-time: 220
content-type: application/json
accept-encoding: identity,gzip
date: Tue, 08 Feb 2022 12:45:20 GMT
server: envoy
strict-transport-security: max-age=31536000; includeSubDomains; preload
x-robots-tag: noindex, nofollow, noimageindex
content-length: 94851266
vary: Accept-Encoding
x-dropbox-response-origin: far_remote
x-dropbox-request-id: b57ed34ca29b4648a4e2e055339b8edb

EDIT:

If I this from my server it convert it to index.html then I have to manually mv index.html index.zip then unzip index.zip and it works.

root@magento /tmp# wget https://www.mymagentoserver.com/downloadable/download/link/id/MC4wNDMwMTAwMCAxNjQzNjc3MzQ4NzQ1OTgzMjAzNzM,/
--2022-02-08 20:29:22--  https://www.mymagentoserver.com/downloadable/download/link/id/MC4wNDMwMTAwMCAxNjQzNjc3MzQ4NzQ1OTgzMjAzNzM,/
Resolving www.mymagentoserver.com (www.mymagentoserver.com)... 192.168.1.100
Connecting to www.mymagentoserver.com (www.mymagentoserver.com)|192.168.1.100|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/zip]
Saving to: ‘index.html’

index.html                                                   [  <=>                                                                                                                             ]  11.60K  11.6KB/s    in 1.0s

2022-02-08 20:29:24 (11.6 KB/s) - ‘index.html’ saved [11880]

This is curl output:

root@magento /tmp# curl -I https://www.mymagentoserver.com/downloadable/download/link/id/MC4wNDMwMTAwMCAxNjQzNjc3MzQ4NzQ1OTgzMjAzNzM,/
HTTP/2 200
server: nginx
date: Tue, 08 Feb 2022 19:50:28 GMT
content-type: application/zip
set-cookie: frontend=o9k7li64jlpdcbiub6p4232od2; expires=Tue, 08-Feb-2022 20:50:27 GMT; Max-Age=3600; path=/; domain=www.mymagentoserver.com; HttpOnly
expires: Thu, 19 Nov 1981 08:52:00 GMT
cache-control: must-revalidate, post-check=0, pre-check=0
set-cookie: frontend_cid=seePcrWLUj9JvZ5r; expires=Tue, 08-Feb-2022 20:50:27 GMT; Max-Age=3600; path=/; domain=www.mymagentoserver.com; secure; HttpOnly
x-frame-options: SAMEORIGIN
content-disposition: attachment; filename="testfile.zip"
vary: User-Agent
front-end-https: on
strict-transport-security: max-age=63072000; includeSubDomains; preload

Any hints?