Skip to content

Commit 114f86c

Browse files
CopilotBornToBeRoot
andcommitted
Add SecurityException handling and fix documentation formatting
Co-authored-by: BornToBeRoot <16019165+BornToBeRoot@users.noreply.github.com>
1 parent 65e9732 commit 114f86c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Source/NETworkManager.Settings/SettingsManager.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public static string GetSettingsFolderLocation()
9292
// Validate that the path doesn't contain invalid characters
9393
try
9494
{
95-
// This will throw ArgumentException or NotSupportedException if the path contains invalid characters
95+
// This will throw ArgumentException, NotSupportedException, or SecurityException if the path is invalid
9696
_ = Path.GetFullPath(policyPath);
9797
return policyPath;
9898
}
@@ -104,6 +104,10 @@ public static string GetSettingsFolderLocation()
104104
{
105105
Log.Error($"Policy-provided SettingsFolderLocation format is not supported: {policyPath}. Falling back to default location.", ex);
106106
}
107+
catch (System.Security.SecurityException ex)
108+
{
109+
Log.Error($"Insufficient permissions to access policy-provided SettingsFolderLocation: {policyPath}. Falling back to default location.", ex);
110+
}
107111
}
108112
}
109113

Website/docs/system-wide-policies.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ The `config.json` file uses a simple JSON structure to define policy values. An
3232
```
3333

3434

35-
**Example with available policies:**
35+
**Example:**
3636

3737
```json
3838
{

0 commit comments

Comments
 (0)