Stufe 4c (#764): Bezeichner auf Englisch - Typen, Methoden, Felder, Parameter, Locals, Testnamen
Mit Roslyn umbenannt (Verweise folgen, Zeichenketten bleiben unberuehrt). Nicht umbenannt, weil gespeichert oder ueber die API gebunden (Stufe 4e): Properties, Record-Parameter, Enum-Member sowie die Parameter der Endpunkt-Handler (Routen-/Query-Bindung ueber den Namen). Die JSON-Felder anonymer Objekte bleiben ausdruecklich benannt (JsonFilter: pfad). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
837a634a22
commit
77062facc9
@@ -45,7 +45,7 @@ public sealed class WorkspacePathTests : IDisposable
|
||||
[InlineData("unterordner/../../../ausserhalb.txt")]
|
||||
[InlineData("./../../evil.txt")]
|
||||
[InlineData("..")]
|
||||
public void Relative_Ausbrueche_werden_abgelehnt(string path)
|
||||
public void Relative_escapes_are_rejected(string path)
|
||||
{
|
||||
Should.Throw<UnauthorizedAccessException>(() => Resolve(path));
|
||||
}
|
||||
@@ -68,7 +68,7 @@ public sealed class WorkspacePathTests : IDisposable
|
||||
[InlineData(@"\\server\share\evil.txt")]
|
||||
[InlineData("//server/share/evil.txt")]
|
||||
[InlineData(@"C:\temp\datei.txt")]
|
||||
public void Absolute_Pfade_und_UNC_Freigaben_werden_abgelehnt(string path)
|
||||
public void Absolute_paths_and_UNC_shares_are_rejected(string path)
|
||||
{
|
||||
Should.Throw<UnauthorizedAccessException>(() => Resolve(path));
|
||||
}
|
||||
@@ -82,7 +82,7 @@ public sealed class WorkspacePathTests : IDisposable
|
||||
[InlineData("/etc/passwd")]
|
||||
[InlineData("/root/.ssh/id_rsa")]
|
||||
[InlineData("../../../../etc/shadow")]
|
||||
public void Unix_Systempfade_werden_abgelehnt(string path)
|
||||
public void Unix_system_paths_are_rejected(string path)
|
||||
{
|
||||
Should.Throw<UnauthorizedAccessException>(() => Resolve(path));
|
||||
}
|
||||
@@ -90,7 +90,7 @@ public sealed class WorkspacePathTests : IDisposable
|
||||
[Theory]
|
||||
[InlineData("datei.txt:versteckt")]
|
||||
[InlineData("datei.txt:$DATA")]
|
||||
public void Alternate_Data_Streams_werden_abgelehnt(string path)
|
||||
public void Alternate_data_streams_are_rejected(string path)
|
||||
{
|
||||
// An ADS would otherwise bypass the extension check: "x.txt:evil.exe".
|
||||
Should.Throw<UnauthorizedAccessException>(() => Resolve(path));
|
||||
@@ -100,7 +100,7 @@ public sealed class WorkspacePathTests : IDisposable
|
||||
/// The actual core of S6: a neighboring directory with the same prefix.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void Ein_Nachbarverzeichnis_mit_gleichem_Praefix_gilt_als_ausserhalb()
|
||||
public void A_sibling_directory_with_the_same_prefix_counts_as_outside()
|
||||
{
|
||||
var backup = _root + "-Backup";
|
||||
|
||||
@@ -108,7 +108,7 @@ public sealed class WorkspacePathTests : IDisposable
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Auch_bei_Rootangabe_mit_Trenner_bleibt_das_Nachbarverzeichnis_aussen()
|
||||
public void Even_with_root_given_with_separator_the_sibling_directory_stays_outside()
|
||||
{
|
||||
var rootWithSeparator = _root + Path.DirectorySeparatorChar;
|
||||
|
||||
@@ -126,7 +126,7 @@ public sealed class WorkspacePathTests : IDisposable
|
||||
[InlineData("a/b/c/tief.json")]
|
||||
[InlineData("./bericht.md")]
|
||||
[InlineData("unterordner/../bericht.md")]
|
||||
public void Pfade_innerhalb_des_Workspace_werden_aufgeloest(string path)
|
||||
public void Paths_inside_the_workspace_are_resolved(string path)
|
||||
{
|
||||
var resolved = Resolve(path);
|
||||
|
||||
@@ -138,7 +138,7 @@ public sealed class WorkspacePathTests : IDisposable
|
||||
[InlineData("")]
|
||||
[InlineData(" ")]
|
||||
[InlineData(".")]
|
||||
public void Leere_Angaben_ergeben_das_Wurzelverzeichnis(string? path)
|
||||
public void Empty_values_give_the_root_directory(string? path)
|
||||
{
|
||||
var resolved = Resolve(path);
|
||||
|
||||
@@ -147,13 +147,13 @@ public sealed class WorkspacePathTests : IDisposable
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Das_Wurzelverzeichnis_selbst_gilt_als_innerhalb()
|
||||
public void The_root_directory_itself_counts_as_inside()
|
||||
{
|
||||
WorkspacePath.IsInside(_root, _root).ShouldBeTrue();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Ein_Unterverzeichnis_mit_aehnlichem_Namen_bleibt_innerhalb()
|
||||
public void A_subdirectory_with_a_similar_name_stays_inside()
|
||||
{
|
||||
// Counter-check to the prefix rule: within the root everything is allowed.
|
||||
var inner = Path.Combine(_root, "Workspace-Backup", "x.txt");
|
||||
|
||||
Reference in New Issue
Block a user