- Issue created by @quietone
alexpott spotted this while reviewing this section from system.install as part of π Fix 'Drupal.Semantics.FunctionT.NotLiteralString' coding standard Active .
foreach ($htaccessWriter->defaultProtectedDirs() as $protected_dir) {
$htaccess_file = $protected_dir->getPath() . '/.htaccess';
// Check for the string which was added to the recommended .htaccess file
// in the latest security update.
if (!file_exists($htaccess_file) || !($contents = @file_get_contents($htaccess_file)) || !str_contains($contents, 'Drupal_Security_Do_Not_Remove_See_SA_2013_003')) {
$url = 'https://www.drupal.org/SA-CORE-2013-003';
$requirements[$htaccess_file] = [
'title' => new TranslatableMarkup($protected_dir->getTitle()),
The comment copied here for convenience,
This almost certainly has never resulted in any of the strings in \Drupal\Core\File\HtaccessWriter::defaultProtectedDirs() being translated. If we want this to work either we need to change the strings to translatable strings in \Drupal\Core\File\HtaccessWriter::defaultProtectedDirs() or we need to list the strings somewhere and somehow that POTX is going to extract them. I think we should change \Drupal\Core\File\ProtectedDirectory to work with translatable strings.
TBA
TBA
Active
11.0 π₯
Last updated