Skip to content

Potential fix for code scanning alert no. 8491: Potentially dangerous use of non-short-circuit logic#19

Merged
ChristianRosewich merged 1 commit into
masterfrom
alert-autofix-8491
Jul 14, 2026
Merged

Potential fix for code scanning alert no. 8491: Potentially dangerous use of non-short-circuit logic#19
ChristianRosewich merged 1 commit into
masterfrom
alert-autofix-8491

Conversation

@ChristianRosewich

Copy link
Copy Markdown
Owner

Potential fix for https://github.com/ChristianRosewich/CSharp/security/code-scanning/8491

Use short-circuit logical AND (&&) instead of non-short-circuit AND (&) in the flagged if condition.

Best fix (no functionality change intended):

  • In GenFreeWin/GenFreeWin/Gen_FreeWin/Views/Fehlerli.cs, at the condition currently written as:
    if (Modul1.Person.Birthday.Trim() == "" & Modul1.Person.Baptised.Trim() == "")
  • Replace & with &&.

No new imports, methods, or dependencies are required.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

… use of non-short-circuit logic

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@ChristianRosewich ChristianRosewich marked this pull request as ready for review July 14, 2026 12:31
@ChristianRosewich ChristianRosewich merged commit 3ddeebf into master Jul 14, 2026
1 of 3 checks passed
@ChristianRosewich ChristianRosewich deleted the alert-autofix-8491 branch July 14, 2026 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant