Skip to content

Upgrade Bootstrap 4.5.3 → 5.3.8 in BFF and various samples - #411

Merged
maartenba merged 2 commits into
mainfrom
dh/bootstrap-5-upgrade-bff-various
Oct 27, 2026
Merged

maartenba merged 2 commits into
mainfrom
dh/bootstrap-5-upgrade-bff-various

Conversation

@damianh

@damianh damianh commented Oct 27, 2026

Copy link
Copy Markdown
Member

Addresses the js/xss-through-dom code scanning alerts in vendored Bootstrap 4.x under BFF/ and various/.

Changes

  • Vendored Bootstrap 4.5.3 → 5.3.8 (official dist, same file set as before), in:
    • IdentityServer hosts: BFF/v{2,3,4}/TokenExchange/TokenExchange.IdentityServer, BFF/v{3,4}/docker/ContainerizedIdentityServer, BFF/v4/MultiFrontendSSO/MultiFrontendSSO.{Client,IdentityServer}, various/clients/Owin/IdentityServerHost
    • JS frontends: FrontendHost/wwwroot/libs in BFF/v{2,3,4}/{JsBffSample,JsBffYarpSample,SplitHosts} and BFF/v{3,4}/docker
  • Markup migration: form-group → mb-3 (row mb-3), form-label on labels, data-toggle/data-dismiss → data-bs-*, mr-auto → me-auto, navbar inner container-fluid, badge-* → bg-*, btn-block → d-grid, form-inline → flex utilities (custom CSS renamed to .todo-form), added the missing btn class to the Create button (BS5 needs it for colours).
  • Removed jQuery (lib/jquery, libs/jquery-3.6.0.min.js) from these hosts. It was only loaded for Bootstrap 4, and nothing else references it now.

Not changed

  • The Angular, React and Vue SPAs, the Blazor samples, and Owin Mvc/WebForms already use Bootstrap 5.x.
  • DPoP.Bff, TokenExchange.Bff and OpenApi.Bff use Bootstrap 3.x, so they're outside the 4.x upgrade scope.
  • bootstrap4-glyphicons is a standalone icon font and still used, so I kept it.

Validation

  • dotnet build passes for all 19 affected projects.
  • A grep finds no remaining v4-only classes or attributes in the touched hosts, and no Bootstrap 4 headers remain under BFF/ or various/.
  • In a browser, the login page renders correctly, the navbar dropdown opens, and the FrontendHost modal opens and closes. The add-todo form layout also renders correctly.

Resolves js/xss-through-dom code scanning alerts in vendored Bootstrap 4.x.

- Replace vendored Bootstrap 4.5.3 (lib/bootstrap and FrontendHost libs/)
  with the official 5.3.8 dist, mirroring the existing file sets.
- Migrate Razor/HTML markup: form-group -> mb-3, form-label, data-bs-*,
  me-auto, navbar container-fluid, badge bg-*, btn-block -> d-grid,
  form-inline -> flex utilities, btn class on Create button.
- Remove jQuery copies that were only loaded for Bootstrap 4.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 27, 2026 08:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Restore responsive wrapping and control sizing in all eleven affected add-todo forms before approval.

11 open issues
What changed in this PR

Upgrades Bootstrap 4.5.3 to 5.3.8 across affected BFF v2–v4 and Owin samples to address vendored-library XSS scanning alerts, with corresponding markup migration and jQuery removal.

Changes:

  • Update vendored Bootstrap assets, licenses, and documentation.
  • Migrate forms, navigation, badges, buttons, and modal attributes to Bootstrap 5.
  • Remove redundant jQuery dependencies and rename custom todo-form selectors.

Unresolved findings: Eleven frontend pages have a moderate responsive-layout regression at line 34: replacing .form-inline with d-flex removes wrapping and causes horizontal overflow on narrow screens. Restore wrapping and auto-size the controls in each affected page.

File Description
various/​clients/​Owin/​IdentityServerHost/​wwwroot/​lib/​jquery/​README.md Remove jQuery documentation.
various/​clients/​Owin/​IdentityServerHost/​wwwroot/​lib/​jquery/​LICENSE.txt Remove jQuery license.
various/​clients/​Owin/​IdentityServerHost/​wwwroot/​lib/​bootstrap/​LICENSE Update Bootstrap license.
various/​clients/​Owin/​IdentityServerHost/​wwwroot/​lib/​bootstrap/​dist/​css/​bootstrap-reboot.min.css Upgrade Reboot CSS.
various/​clients/​Owin/​IdentityServerHost/​Pages/​Shared/​_Nav.cshtml Migrate navbar and dropdown markup.
various/​clients/​Owin/​IdentityServerHost/​Pages/​Shared/​_Layout.cshtml Remove jQuery include.
various/​clients/​Owin/​IdentityServerHost/​Pages/​Device/​Index.cshtml Migrate form spacing and labels.
various/​clients/​Owin/​IdentityServerHost/​Pages/​Consent/​Index.cshtml Migrate consent spacing.
various/​clients/​Owin/​IdentityServerHost/​Pages/​Ciba/​Consent.cshtml Migrate CIBA consent spacing.
various/​clients/​Owin/​IdentityServerHost/​Pages/​Account/​Logout/​Index.cshtml Migrate logout spacing.
various/​clients/​Owin/​IdentityServerHost/​Pages/​Account/​Login/​Index.cshtml Migrate login spacing and labels.
BFF/​v4/​TokenExchange/​TokenExchange.IdentityServer/​wwwroot/​lib/​jquery/​README.md Remove jQuery documentation.
BFF/​v4/​TokenExchange/​TokenExchange.IdentityServer/​wwwroot/​lib/​jquery/​LICENSE.txt Remove jQuery license.
BFF/​v4/​TokenExchange/​TokenExchange.IdentityServer/​wwwroot/​lib/​bootstrap/​LICENSE Update Bootstrap license.
BFF/​v4/​TokenExchange/​TokenExchange.IdentityServer/​wwwroot/​lib/​bootstrap/​dist/​css/​bootstrap-reboot.min.css Upgrade Reboot CSS.
BFF/​v4/​TokenExchange/​TokenExchange.IdentityServer/​Pages/​Shared/​_Nav.cshtml Migrate navbar and dropdown markup.
BFF/​v4/​TokenExchange/​TokenExchange.IdentityServer/​Pages/​Shared/​_Layout.cshtml Remove jQuery include.
BFF/​v4/​TokenExchange/​TokenExchange.IdentityServer/​Pages/​Device/​Index.cshtml Migrate form spacing and labels.
BFF/​v4/​TokenExchange/​TokenExchange.IdentityServer/​Pages/​Consent/​Index.cshtml Migrate consent spacing.
BFF/​v4/​TokenExchange/​TokenExchange.IdentityServer/​Pages/​Ciba/​Consent.cshtml Migrate CIBA consent spacing.
BFF/​v4/​TokenExchange/​TokenExchange.IdentityServer/​Pages/​Account/​Logout/​Index.cshtml Migrate logout spacing.
BFF/​v4/​TokenExchange/​TokenExchange.IdentityServer/​Pages/​Account/​Login/​Index.cshtml Migrate login spacing and labels.
BFF/​v4/​SplitHosts/​FrontendHost/​wwwroot/​StyleSheet.css Rename todo-form selectors.
BFF/​v4/​SplitHosts/​FrontendHost/​wwwroot/​index.html Migrate form/modal; remove jQuery. Moderate: wrapping regression at line 34.
BFF/​v4/​MultiFrontendSSO/​MultiFrontendSSO.IdentityServer/​Pages/​Shared/​_Nav.cshtml Migrate navbar and dropdown markup.
BFF/​v4/​MultiFrontendSSO/​MultiFrontendSSO.IdentityServer/​Pages/​Shared/​_Layout.cshtml Remove jQuery include.
BFF/​v4/​MultiFrontendSSO/​MultiFrontendSSO.IdentityServer/​Pages/​ServerSideSessions/​Index.cshtml Migrate filter-row spacing.
BFF/​v4/​MultiFrontendSSO/​MultiFrontendSSO.IdentityServer/​Pages/​Device/​Index.cshtml Migrate form spacing and labels.
BFF/​v4/​MultiFrontendSSO/​MultiFrontendSSO.IdentityServer/​Pages/​Consent/​Index.cshtml Migrate consent spacing.
BFF/​v4/​MultiFrontendSSO/​MultiFrontendSSO.IdentityServer/​Pages/​Ciba/​Consent.cshtml Migrate CIBA consent spacing.
BFF/​v4/​MultiFrontendSSO/​MultiFrontendSSO.IdentityServer/​Pages/​Account/​Logout/​Index.cshtml Migrate logout spacing.
BFF/​v4/​MultiFrontendSSO/​MultiFrontendSSO.IdentityServer/​Pages/​Account/​Login/​Index.cshtml Migrate login spacing and labels.
BFF/​v4/​MultiFrontendSSO/​MultiFrontendSSO.IdentityServer/​Pages/​Account/​Create/​Index.cshtml Migrate registration spacing and labels.
BFF/​v4/​MultiFrontendSSO/​MultiFrontendSSO.IdentityServer/​idsrv-wwwroot/​lib/​jquery/​README.md Remove jQuery documentation.
BFF/​v4/​MultiFrontendSSO/​MultiFrontendSSO.IdentityServer/​idsrv-wwwroot/​lib/​jquery/​LICENSE.txt Remove jQuery license.
BFF/​v4/​MultiFrontendSSO/​MultiFrontendSSO.IdentityServer/​idsrv-wwwroot/​lib/​bootstrap/​LICENSE Update Bootstrap license.
BFF/​v4/​MultiFrontendSSO/​MultiFrontendSSO.IdentityServer/​idsrv-wwwroot/​lib/​bootstrap/​dist/​css/​bootstrap-reboot.min.css Upgrade Reboot CSS.
BFF/​v4/​MultiFrontendSSO/​MultiFrontendSSO.Client/​wwwroot/​lib/​jquery/​README.md Remove jQuery documentation.
BFF/​v4/​MultiFrontendSSO/​MultiFrontendSSO.Client/​wwwroot/​lib/​jquery/​LICENSE.txt Remove jQuery license.
BFF/​v4/​MultiFrontendSSO/​MultiFrontendSSO.Client/​wwwroot/​lib/​bootstrap/​LICENSE Update Bootstrap license.
BFF/​v4/​MultiFrontendSSO/​MultiFrontendSSO.Client/​wwwroot/​lib/​bootstrap/​dist/​css/​bootstrap-reboot.min.css Upgrade Reboot CSS.
BFF/​v4/​MultiFrontendSSO/​MultiFrontendSSO.Client/​Views/​Index.cshtml Migrate navbar, badges, and buttons; remove jQuery.
BFF/​v4/​JsBffYarpSample/​FrontendHost/​wwwroot/​StyleSheet.css Rename todo-form selectors.
BFF/​v4/​JsBffYarpSample/​FrontendHost/​wwwroot/​index.html Migrate form/modal; remove jQuery. Moderate: wrapping regression at line 34.
BFF/​v4/​JsBffSample/​FrontendHost/​wwwroot/​StyleSheet.css Rename todo-form selectors.
BFF/​v4/​JsBffSample/​FrontendHost/​wwwroot/​index.html Migrate form/modal; remove jQuery. Moderate: wrapping regression at line 34.
BFF/​v4/​docker/​FrontendHost/​wwwroot/​StyleSheet.css Rename todo-form selectors.
BFF/​v4/​docker/​FrontendHost/​wwwroot/​index.html Migrate form/modal; remove jQuery. Moderate: wrapping regression at line 34.
BFF/​v4/​docker/​ContainerizedIdentityServer/​wwwroot/​lib/​jquery/​README.md Remove jQuery documentation.
BFF/​v4/​docker/​ContainerizedIdentityServer/​wwwroot/​lib/​jquery/​LICENSE.txt Remove jQuery license.
BFF/​v4/​docker/​ContainerizedIdentityServer/​wwwroot/​lib/​bootstrap/​README.md Refresh Bootstrap documentation.
BFF/​v4/​docker/​ContainerizedIdentityServer/​wwwroot/​lib/​bootstrap/​LICENSE Update Bootstrap license.
BFF/​v4/​docker/​ContainerizedIdentityServer/​wwwroot/​lib/​bootstrap/​dist/​css/​bootstrap-reboot.min.css Upgrade Reboot CSS.
BFF/​v4/​docker/​ContainerizedIdentityServer/​Pages/​Shared/​_Nav.cshtml Migrate navbar and dropdown markup.
BFF/​v4/​docker/​ContainerizedIdentityServer/​Pages/​Shared/​_Layout.cshtml Remove jQuery include.
BFF/​v4/​docker/​ContainerizedIdentityServer/​Pages/​ServerSideSessions/​Index.cshtml Migrate filter-row spacing.
BFF/​v4/​docker/​ContainerizedIdentityServer/​Pages/​Device/​Index.cshtml Migrate form spacing and labels.
BFF/​v4/​docker/​ContainerizedIdentityServer/​Pages/​Consent/​Index.cshtml Migrate consent spacing.
BFF/​v4/​docker/​ContainerizedIdentityServer/​Pages/​Ciba/​Consent.cshtml Migrate CIBA consent spacing.
BFF/​v4/​docker/​ContainerizedIdentityServer/​Pages/​Account/​Logout/​Index.cshtml Migrate logout spacing.
BFF/​v4/​docker/​ContainerizedIdentityServer/​Pages/​Account/​Login/​Index.cshtml Migrate login spacing and labels.
BFF/​v4/​docker/​ContainerizedIdentityServer/​Pages/​Account/​Create/​Index.cshtml Migrate registration spacing and labels.
BFF/​v3/​TokenExchange/​TokenExchange.IdentityServer/​wwwroot/​lib/​jquery/​README.md Remove jQuery documentation.
BFF/​v3/​TokenExchange/​TokenExchange.IdentityServer/​wwwroot/​lib/​jquery/​LICENSE.txt Remove jQuery license.
BFF/​v3/​TokenExchange/​TokenExchange.IdentityServer/​wwwroot/​lib/​bootstrap/​LICENSE Update Bootstrap license.
BFF/​v3/​TokenExchange/​TokenExchange.IdentityServer/​wwwroot/​lib/​bootstrap/​dist/​css/​bootstrap-reboot.min.css Upgrade Reboot CSS.
BFF/​v3/​TokenExchange/​TokenExchange.IdentityServer/​Pages/​Shared/​_Nav.cshtml Migrate navbar and dropdown markup.
BFF/​v3/​TokenExchange/​TokenExchange.IdentityServer/​Pages/​Shared/​_Layout.cshtml Remove jQuery include.
BFF/​v3/​TokenExchange/​TokenExchange.IdentityServer/​Pages/​Device/​Index.cshtml Migrate form spacing and labels.
BFF/​v3/​TokenExchange/​TokenExchange.IdentityServer/​Pages/​Consent/​Index.cshtml Migrate consent spacing.
BFF/​v3/​TokenExchange/​TokenExchange.IdentityServer/​Pages/​Ciba/​Consent.cshtml Migrate CIBA consent spacing.
BFF/​v3/​TokenExchange/​TokenExchange.IdentityServer/​Pages/​Account/​Logout/​Index.cshtml Migrate logout spacing.
BFF/​v3/​TokenExchange/​TokenExchange.IdentityServer/​Pages/​Account/​Login/​Index.cshtml Migrate login spacing and labels.
BFF/​v3/​SplitHosts/​FrontendHost/​wwwroot/​StyleSheet.css Rename todo-form selectors.
BFF/​v3/​SplitHosts/​FrontendHost/​wwwroot/​index.html Migrate form/modal; remove jQuery. Moderate: wrapping regression at line 34.
BFF/​v3/​JsBffYarpSample/​FrontendHost/​wwwroot/​StyleSheet.css Rename todo-form selectors.
BFF/​v3/​JsBffYarpSample/​FrontendHost/​wwwroot/​index.html Migrate form/modal; remove jQuery. Moderate: wrapping regression at line 34.
BFF/​v3/​JsBffSample/​FrontendHost/​wwwroot/​StyleSheet.css Rename todo-form selectors.
BFF/​v3/​JsBffSample/​FrontendHost/​wwwroot/​index.html Migrate form/modal; remove jQuery. Moderate: wrapping regression at line 34.
BFF/​v3/​docker/​FrontendHost/​wwwroot/​StyleSheet.css Rename todo-form selectors.
BFF/​v3/​docker/​FrontendHost/​wwwroot/​index.html Migrate form/modal; remove jQuery. Moderate: wrapping regression at line 34.
BFF/​v3/​docker/​ContainerizedIdentityServer/​wwwroot/​lib/​jquery/​README.md Remove jQuery documentation.
BFF/​v3/​docker/​ContainerizedIdentityServer/​wwwroot/​lib/​jquery/​LICENSE.txt Remove jQuery license.
BFF/​v3/​docker/​ContainerizedIdentityServer/​wwwroot/​lib/​bootstrap/​LICENSE Update Bootstrap license.
BFF/​v3/​docker/​ContainerizedIdentityServer/​wwwroot/​lib/​bootstrap/​dist/​css/​bootstrap-reboot.min.css Upgrade Reboot CSS.
BFF/​v3/​docker/​ContainerizedIdentityServer/​Pages/​Shared/​_Nav.cshtml Migrate navbar and dropdown markup.
BFF/​v3/​docker/​ContainerizedIdentityServer/​Pages/​Shared/​_Layout.cshtml Remove jQuery include.
BFF/​v3/​docker/​ContainerizedIdentityServer/​Pages/​ServerSideSessions/​Index.cshtml Migrate filter-row spacing.
BFF/​v3/​docker/​ContainerizedIdentityServer/​Pages/​Device/​Index.cshtml Migrate form spacing and labels.
BFF/​v3/​docker/​ContainerizedIdentityServer/​Pages/​Consent/​Index.cshtml Migrate consent spacing.
BFF/​v3/​docker/​ContainerizedIdentityServer/​Pages/​Ciba/​Consent.cshtml Migrate CIBA consent spacing.
BFF/​v3/​docker/​ContainerizedIdentityServer/​Pages/​Account/​Logout/​Index.cshtml Migrate logout spacing.
BFF/​v3/​docker/​ContainerizedIdentityServer/​Pages/​Account/​Login/​Index.cshtml Migrate login spacing and labels.
BFF/​v3/​docker/​ContainerizedIdentityServer/​Pages/​Account/​Create/​Index.cshtml Migrate registration spacing and labels.
BFF/​v2/​TokenExchange/​TokenExchange.IdentityServer/​wwwroot/​lib/​jquery/​README.md Remove jQuery documentation.
BFF/​v2/​TokenExchange/​TokenExchange.IdentityServer/​wwwroot/​lib/​jquery/​LICENSE.txt Remove jQuery license.
BFF/​v2/​TokenExchange/​TokenExchange.IdentityServer/​wwwroot/​lib/​bootstrap/​LICENSE Update Bootstrap license.
BFF/​v2/​TokenExchange/​TokenExchange.IdentityServer/​wwwroot/​lib/​bootstrap/​dist/​css/​bootstrap-reboot.min.css Upgrade Reboot CSS.
BFF/​v2/​TokenExchange/​TokenExchange.IdentityServer/​Pages/​Shared/​_Nav.cshtml Migrate navbar and dropdown markup.
BFF/​v2/​TokenExchange/​TokenExchange.IdentityServer/​Pages/​Shared/​_Layout.cshtml Remove jQuery include.
BFF/​v2/​TokenExchange/​TokenExchange.IdentityServer/​Pages/​Device/​Index.cshtml Migrate form spacing and labels.
BFF/​v2/​TokenExchange/​TokenExchange.IdentityServer/​Pages/​Consent/​Index.cshtml Migrate consent spacing.
BFF/​v2/​TokenExchange/​TokenExchange.IdentityServer/​Pages/​Ciba/​Consent.cshtml Migrate CIBA consent spacing.
BFF/​v2/​TokenExchange/​TokenExchange.IdentityServer/​Pages/​Account/​Logout/​Index.cshtml Migrate logout spacing.
BFF/​v2/​TokenExchange/​TokenExchange.IdentityServer/​Pages/​Account/​Login/​Index.cshtml Migrate login spacing and labels.
BFF/​v2/​SplitHosts/​FrontendHost/​wwwroot/​StyleSheet.css Rename todo-form selectors.
BFF/​v2/​SplitHosts/​FrontendHost/​wwwroot/​index.html Migrate form/modal; remove jQuery. Moderate: wrapping regression at line 34.
BFF/​v2/​JsBffYarpSample/​FrontendHost/​wwwroot/​StyleSheet.css Rename todo-form selectors.
BFF/​v2/​JsBffYarpSample/​FrontendHost/​wwwroot/​index.html Migrate form/modal; remove jQuery. Moderate: wrapping regression at line 34.
BFF/​v2/​JsBffSample/​FrontendHost/​wwwroot/​StyleSheet.css Rename todo-form selectors.
BFF/​v2/​JsBffSample/​FrontendHost/​wwwroot/​index.html Migrate form/modal; remove jQuery. Moderate: wrapping regression at line 34.

Review effort: Balanced

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 27, 2026 08:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maartenba
maartenba merged commit a3438b3 into main Oct 27, 2026
26 checks passed
@maartenba
maartenba deleted the dh/bootstrap-5-upgrade-bff-various branch October 27, 2026 10:25
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.

3 participants