Commit 20cf96f
committed
fix(csharp): use numeric .NET version check to prevent double URL-encoding on .NET 9+
On .NET 9+, HttpUtility.ParseQueryString() already URL-encodes values internally.
The previous fix only checked for '.NET 9' literally, missing .NET 10+ (PowerShell 7.6).
Replace the string prefix check with a numeric major version comparison (>= 9) and
move the RuntimeInformation check outside the foreach loop to avoid redundant parsing.
Fixes: CSCwu080561 parent 65df3c2 commit 20cf96f
1 file changed
Lines changed: 8 additions & 2 deletions
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
133 | 140 | | |
134 | 141 | | |
135 | 142 | | |
136 | | - | |
137 | | - | |
| 143 | + | |
138 | 144 | | |
139 | 145 | | |
140 | 146 | | |
| |||
0 commit comments