Software /
code /
prosody-modules
Changeset
2979:9480ca61294d
mod_http_upload_external: Fix syntax error in share.php
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 02 Apr 2018 15:00:57 +0100 |
parents | 2978:ac99a04231b1 |
children | 2980:ba6466fa6823 |
files | mod_http_upload_external/share.php |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_http_upload_external/share.php Mon Apr 02 10:57:17 2018 +0100 +++ b/mod_http_upload_external/share.php Mon Apr 02 15:00:57 2018 +0100 @@ -70,7 +70,7 @@ $request_method = $_SERVER['REQUEST_METHOD']; if(array_key_exists('v', $_GET) === TRUE && $request_method === 'PUT') { - $upload_file_size = $_SERVER['HTTP_CONTENT_LENGTH']; + $upload_file_size = $_SERVER['CONTENT_LENGTH']; $upload_token = $_GET['v']; $calculated_token = hash_hmac('sha256', "$upload_file_name $upload_file_size", $CONFIG_SECRET); @@ -104,9 +104,9 @@ header('Content-Disposition: attachment'); header('Content-Type: application/octet-stream'); header('Content-Length: '.filesize($store_file_name)); - header('Content-Security-Policy: "default-src \'none\'"'); - header('X-Content-Security-Policy: "default-src \'none\'"'); - header('X-WebKit-CSP: "default-src 'none'"'); + header("Content-Security-Policy: \"default-src 'none'\""); + header("X-Content-Security-Policy: \"default-src 'none'\""); + header("X-WebKit-CSP: \"default-src 'none'\""); if($request_method !== 'HEAD') { readfile($store_file_name); }