feat: .env-Varianten und Kopien mit Zusatzendung im Editor
.env, .env.local, .env.production, app.env usw. gelten immer als Text. Zusatzendungen wie .example, .sample, .dist, .bak, .orig, .local werden bei der Typerkennung abgeschnitten (nginx.conf.sample, config.yml.dist). Gleiche Regeln in preview.php und app.js. Paket 2026.11.21.r007. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1ca0d5aaae
commit
0117670ede
7 files changed
+46
-5
No files matched your search
@@ -197,6 +197,12 @@ check('windows-1252 is written back in its encoding', $r['status'] === 200 && fi
|
||||
$r = call('POST', 'preview.php?path=' . urlencode($share . '/latin.cfg'), ['content' => "€ ok, ✓ nicht\r\n", 'revision' => $r['json']['revision']]);
|
||||
check('characters outside windows-1252 are refused', $r['status'] === 422 && file_get_contents($share . '/latin.cfg') === "Gr\xfc\xdfe=2\r\n");
|
||||
|
||||
foreach (['.env', '.env.local', '.env.production', 'app.env', 'nginx.conf.sample', 'config.yml.dist', 'settings.json.bak'] as $variant) {
|
||||
file_put_contents($share . '/' . $variant, "KEY=1\n");
|
||||
$r = call('GET', 'preview.php?path=' . urlencode($share . '/' . $variant));
|
||||
check("$variant is editable", ($r['json']['editable'] ?? false) === true, (string)$r['status']);
|
||||
}
|
||||
|
||||
// whole system root (opt-in)
|
||||
$r = call('GET', 'list.php?path=/');
|
||||
check('system root is hidden by default', $r['status'] === 403);
|
||||
|
||||
Reference in new issue
Block a user