adding correct HTTP error to response, as per @rugk's recommentation

This commit is contained in:
El RIDO 2017-10-08 07:03:53 +02:00
parent dbfb1e83ba
commit 4ded4b7f8c
No known key found for this signature in database
GPG Key ID: 0F5C940A6BD81F92
2 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
;<?php /* ;<?php http_response_code(403); /*
; config file for PrivateBin ; config file for PrivateBin
; ;
; An explanation of each setting can be find online at https://github.com/PrivateBin/PrivateBin/wiki/Configuration. ; An explanation of each setting can be find online at https://github.com/PrivateBin/PrivateBin/wiki/Configuration.

View File

@ -108,7 +108,7 @@ class Configuration
// don't overwrite already converted file // don't overwrite already converted file
if (!is_file($configFile)) { if (!is_file($configFile)) {
$iniHandle = fopen($configIni, 'r', false, stream_context_create()); $iniHandle = fopen($configIni, 'r', false, stream_context_create());
$written = file_put_contents($configFile, ';<?php /*' . PHP_EOL); $written = file_put_contents($configFile, ';<?php http_response_code(403); /*' . PHP_EOL);
$written = file_put_contents($configFile, $iniHandle, FILE_APPEND); $written = file_put_contents($configFile, $iniHandle, FILE_APPEND);
fclose($iniHandle); fclose($iniHandle);
unlink($configIni); unlink($configIni);