Update Apache config syntax in .htaccess files

"Deny from all" is deprecated; the replacement syntax has been
available since Apache 2.4 (originally released in 2012).

See <https://httpd.apache.org/docs/2.4/howto/access.html>.

Bug: T360850
Change-Id: I825053ccefe34f6ca4e04af5ad2601f79e4d51a7
This commit is contained in:
Kunal Mehta 2024-03-23 23:34:53 -04:00
parent 7cb4ec40df
commit 903544aabc
11 changed files with 11 additions and 11 deletions

2
cache/.htaccess vendored
View file

@ -1 +1 @@
Deny from all
Require all denied

View file

@ -1 +1 @@
Deny from all
Require all denied

View file

@ -40,6 +40,6 @@ class ComposerVendorHtaccessCreator {
return;
}
file_put_contents( $fname, "Deny from all\n" );
file_put_contents( $fname, "Require all denied\n" );
}
}

View file

@ -154,7 +154,7 @@ class SqliteInstaller extends DatabaseInstaller {
}
}
# Put a .htaccess file in case the user didn't take our advice
file_put_contents( "$dir/.htaccess", "Deny from all\n" );
file_put_contents( "$dir/.htaccess", "Require all denied\n" );
return Status::newGood();
}

View file

@ -966,7 +966,7 @@ class FSFileBackend extends FileBackendStore {
* @return string
*/
protected function htaccessPrivate() {
return "Deny from all\n";
return "Require all denied\n";
}
/**

View file

@ -1 +1 @@
Deny from all
Require all denied

View file

@ -1 +1 @@
Deny from all
Require all denied

View file

@ -1 +1 @@
Deny from all
Require all denied

View file

@ -1 +1 @@
Deny from all
Require all denied

View file

@ -61,7 +61,7 @@ class SqliteInstallerTest extends MediaWikiUnitTestCase {
$dir = sys_get_temp_dir() . '/' . uniqid( 'MediaWikiTest' );
$status = $method->invoke( null, $dir );
$this->assertStatusGood( $status );
$this->assertSame( "Deny from all\n", file_get_contents( "$dir/.htaccess" ) );
$this->assertSame( "Require all denied\n", file_get_contents( "$dir/.htaccess" ) );
unlink( "$dir/.htaccess" );
rmdir( $dir );
}

View file

@ -1 +1 @@
Allow from all
Require all granted