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
;
; 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
if (!is_file($configFile)) {
$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);
fclose($iniHandle);
unlink($configIni);