Check for a valid file

This commit is contained in:
Jamie Cameron
2021-06-08 10:45:06 -07:00
parent f980085849
commit 6d323614a8
2 changed files with 2 additions and 0 deletions

View File

@ -20,6 +20,7 @@ manual_edata=No new contents entered
list_title=Manage PHP Configuration
list_ecannot=You are not allowed to manage this PHP configuration file
list_efile=File to edit must be an absolute path
list_return=PHP configuration
list_format_ini=INI format
list_format_fpm=FPM format

View File

@ -3,6 +3,7 @@
require './phpini-lib.pl';
&ReadParse();
$in{'file'} =~ /^\// || &error($text{'list_efile'});
&can_php_config($in{'file'}) || &error($text{'list_ecannot'});
# Work out if we can just see one file