Skip to content

Duplicated form field id in the UI forces network connection abort by the browser, leading to http status 499 #696

Closed

Description

@emil-wire

Current Behavior

My setup: depedency-track docker, version 4.10.0 (api + frontend) fronted by traefik for TLS termination and routing.
Chromium 121.0.6111.0, Firefox 121.0.1

When accessing any project on the projects page, both Chromium and Firefox cancel/NS_BINDING_ABORTED their requests to (examples)
https://example.com/api/v1/component/project/2c068bda-2155-475d-8f98-0f56ea078188?onlyOutdated=false&onlyDirect=false&searchText=&pageSize=10&pageNumber=1

and

https://example.com/api/v1/component/project/2c068bda-2155-475d-8f98-0f56ea078188?onlyOutdated=false&onlyDirect=false&searchText=&pageSize=10&pageNumber=1

which leads to HTTP error 499 on Traefik and an error 500 on the API server (ERROR [ServerRuntime$Responder] An I/O error has occurred while writing a response message entity to the container output stream.).

After some debugging, I believe the cause for this issue lies with duplicated form field ids:

<input id="showSuppressedFindings" type="checkbox" true-value="value" false-value="uncheckedValue" class="switch-input form-check-input" value="true">
the offending check boxes can be found in epssToolbar and the findingsToolbar

Steps to Reproduce

  1. Enable TLS on the API server placed in front of the API server
  2. Go to any project from the projects page and check the chrome/firefox dev tools' network tab. Both will have aborted requests showing

Expected Behavior

No aborted requests and unique ids for html elements (or use classes) and in general correct usage of the input element in html.

Aside: Chrome dev tools also show 74 warnings for input elements in general, as the 74 elements don't have an ID or name attribute.

Dependency-Track Frontend Version

4.10.0

Browser

Mozilla Firefox

Browser Version

121.0.1

Operating System

macOS

Checklist

Activity

  1. added
    defect
    on Jan 14, 2024
  2. nscuro commented on Feb 3, 2024

    @nscuro
    Member

    Thanks for reporting!

    This is fixed in #726. The culprit were the "Only Direct" and "Only Outdated" toggles in the "Components" tab.

  3. added this to the 4.11 milestone on Feb 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    defect

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions