Commit 1c81886
committed
CodeQL cleanup in the Control Panel Views layer
Every change is behaviour-preserving; the analysis of each finding said so
before the edit did.
Misleading indentation (5): all five were the stacked multi-foreach idiom
(inner loop unindented under its outer), not latent bugs - the full cross
product is intended at every site. FindSetting_ became SelectMany/
FirstOrDefault, the two AssignAccessibleNames became braced nested loops,
the BuildUi wiring loop was indented, and Save_Click's triple loop became
a SelectMany flattening (its body never used tab or card).
Dead store: ApiKeysView dropped the unused 'label' capture of Field_'s
return - the helper adds the control to the panel itself, and the two
sibling call sites already discard it.
LINQ shape (10): find-first loops became FirstOrDefault (TLS certificate
lookups, SSL grid reselect), digit scans became All(char.IsAsciiDigit)
(backup archive-name parsing), the activity scan became nested Any, and
filter/projection prologues moved into Where/Select where the predicate
is pure and order is unchanged. CertificateNameFor keeps its exact
found-but-null-Name behaviour.
Also combined one nested if (IniNumber.CreateEditor - TryParse assigns
the out var on every path, so the merge is exact), removed a genuine
cast-to-self on the statically-typed ServerSession.Host, and added the
two missing XML doc summaries.1 parent 060b542 commit 1c81886
10 files changed
Lines changed: 59 additions & 95 deletions
Lines changed: 2 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
840 | 841 | | |
841 | 842 | | |
842 | 843 | | |
843 | | - | |
844 | | - | |
845 | | - | |
846 | | - | |
847 | | - | |
848 | | - | |
849 | | - | |
850 | | - | |
851 | | - | |
852 | | - | |
| 844 | + | |
853 | 845 | | |
854 | 846 | | |
855 | 847 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
610 | 610 | | |
611 | 611 | | |
612 | 612 | | |
613 | | - | |
| 613 | + | |
614 | 614 | | |
615 | 615 | | |
616 | 616 | | |
| |||
Lines changed: 9 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
346 | 347 | | |
347 | 348 | | |
348 | 349 | | |
349 | | - | |
| 350 | + | |
| 351 | + | |
350 | 352 | | |
351 | | - | |
352 | 353 | | |
353 | 354 | | |
354 | 355 | | |
| |||
469 | 470 | | |
470 | 471 | | |
471 | 472 | | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | | - | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
478 | 477 | | |
479 | 478 | | |
480 | 479 | | |
| |||
512 | 511 | | |
513 | 512 | | |
514 | 513 | | |
515 | | - | |
516 | | - | |
517 | | - | |
| 514 | + | |
| 515 | + | |
518 | 516 | | |
519 | 517 | | |
520 | 518 | | |
| |||
Lines changed: 3 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
| |||
421 | 422 | | |
422 | 423 | | |
423 | 424 | | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | | - | |
428 | | - | |
| 425 | + | |
| 426 | + | |
429 | 427 | | |
430 | 428 | | |
431 | 429 | | |
| |||
Lines changed: 5 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
890 | 891 | | |
891 | 892 | | |
892 | 893 | | |
893 | | - | |
894 | | - | |
895 | | - | |
896 | | - | |
897 | | - | |
| 894 | + | |
| 895 | + | |
898 | 896 | | |
899 | | - | |
900 | | - | |
901 | | - | |
902 | | - | |
903 | | - | |
| 897 | + | |
| 898 | + | |
904 | 899 | | |
905 | 900 | | |
906 | 901 | | |
| |||
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1620 | 1620 | | |
1621 | 1621 | | |
1622 | 1622 | | |
1623 | | - | |
| 1623 | + | |
1624 | 1624 | | |
1625 | | - | |
1626 | 1625 | | |
1627 | 1626 | | |
1628 | 1627 | | |
| |||
Lines changed: 11 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
692 | 692 | | |
693 | 693 | | |
694 | 694 | | |
| 695 | + | |
695 | 696 | | |
696 | 697 | | |
697 | 698 | | |
| |||
804 | 805 | | |
805 | 806 | | |
806 | 807 | | |
807 | | - | |
808 | | - | |
809 | | - | |
810 | | - | |
811 | | - | |
812 | | - | |
813 | | - | |
814 | | - | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
815 | 811 | | |
816 | 812 | | |
817 | 813 | | |
| |||
2703 | 2699 | | |
2704 | 2700 | | |
2705 | 2701 | | |
2706 | | - | |
2707 | 2702 | | |
2708 | | - | |
2709 | | - | |
| 2703 | + | |
| 2704 | + | |
| 2705 | + | |
| 2706 | + | |
| 2707 | + | |
2710 | 2708 | | |
2711 | 2709 | | |
2712 | 2710 | | |
| |||
2772 | 2770 | | |
2773 | 2771 | | |
2774 | 2772 | | |
2775 | | - | |
2776 | | - | |
| 2773 | + | |
| 2774 | + | |
2777 | 2775 | | |
2778 | 2776 | | |
2779 | 2777 | | |
| |||
Lines changed: 12 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
458 | 458 | | |
459 | 459 | | |
460 | 460 | | |
461 | | - | |
| 461 | + | |
| 462 | + | |
462 | 463 | | |
463 | | - | |
464 | | - | |
| 464 | + | |
465 | 465 | | |
466 | 466 | | |
467 | 467 | | |
| |||
2581 | 2581 | | |
2582 | 2582 | | |
2583 | 2583 | | |
2584 | | - | |
2585 | | - | |
2586 | 2584 | | |
2587 | | - | |
2588 | | - | |
| 2585 | + | |
| 2586 | + | |
| 2587 | + | |
| 2588 | + | |
| 2589 | + | |
| 2590 | + | |
| 2591 | + | |
| 2592 | + | |
2589 | 2593 | | |
2590 | 2594 | | |
2591 | 2595 | | |
| |||
3183 | 3187 | | |
3184 | 3188 | | |
3185 | 3189 | | |
3186 | | - | |
3187 | | - | |
3188 | | - | |
| 3190 | + | |
3189 | 3191 | | |
3190 | 3192 | | |
3191 | 3193 | | |
| |||
Lines changed: 5 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
138 | 139 | | |
139 | 140 | | |
140 | 141 | | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
149 | 145 | | |
150 | 146 | | |
151 | 147 | | |
| |||
271 | 267 | | |
272 | 268 | | |
273 | 269 | | |
274 | | - | |
| 270 | + | |
275 | 271 | | |
276 | | - | |
277 | | - | |
278 | 272 | | |
279 | 273 | | |
280 | 274 | | |
| |||
Lines changed: 10 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
135 | 136 | | |
136 | 137 | | |
137 | 138 | | |
138 | | - | |
| 139 | + | |
139 | 140 | | |
140 | 141 | | |
141 | 142 | | |
| |||
222 | 223 | | |
223 | 224 | | |
224 | 225 | | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
| 226 | + | |
| 227 | + | |
230 | 228 | | |
231 | | - | |
| 229 | + | |
232 | 230 | | |
233 | 231 | | |
234 | 232 | | |
| |||
313 | 311 | | |
314 | 312 | | |
315 | 313 | | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
| 314 | + | |
| 315 | + | |
323 | 316 | | |
324 | 317 | | |
325 | 318 | | |
326 | 319 | | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
335 | 323 | | |
336 | 324 | | |
337 | 325 | | |
| |||
0 commit comments