# Creates a new .htaccess file for some directory
require './apache-lib.pl';
+&error_setup($text{'htaccess_err'});
&ReadParse();
$access{'global'} || &error($text{'htaccess_ecannot'});
$conf = &get_config();
+$in{'file'} || &error($text{'htaccess_eempty'});
+$in{'file'} =~ /^\// && $in{'file'} !~ /\.\./ ||
+ &error($text{'htaccess_eabsolute'});
if (-d $in{'file'}) {
# user entered a directory.. create a file in that directory
if (!$accfile) { $accfile = ".htaccess"; }
$file = "$in{'file'}/$accfile";
}
-else { $file = $in{'file'}; }
+else {
+ $file = $in{'file'};
+ }
&allowed_auth_file($file) ||
&error($text{'htaccess_ecreate'});
htaccess_edir='$1' is not a valid directory
htaccess_ecreate=You are not allowed to create this options file
htaccess_edelete=You are not allowed to delete this options file
+htaccess_eempty=No options file directory entered
+htaccess_eabsolute=Options file directory must be an absolute path
+htaccess_err=Failed to create options file
htindex_ecannot=You are not allowed to edit this options file
htindex_title=Per-Directory Options File