Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-70319

[UI] API/Ingress IP fields lack character limit; accepts long non-IP strings (e.g., SSH keys)

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • 4.22.0
    • None
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None
    • None
    • In Progress
    • Release Note Not Required
    • None
    • None
    • None
    • None
    • None

      This is a clone of issue OCPBUGS-70171. The following is the description of the original issue:

      Description of problem:

      The API and Ingress IP input fields in the Assisted Installer OVE UI lack a character length restriction (maxlength). Currently, these fields allow users to paste or type arbitrarily long alphanumeric strings, such as full SSH public keys. While the UI eventually displays a "Not a valid IP address" error, it does so only after the entire long string has been accepted into the field.

      Version-Release number of selected component (if applicable):

          4.22

      How reproducible:

          Always

      Steps to Reproduce:

      1. Launch the Disconnected Assisted Installer OVE UI.
      2. Navigate to the network configuration section.
      3. Copy a standard SSH public key (typically 300+ characters).
      4. Paste this key into the API IP or Ingress IP input fields.

      Actual results:

          Accepts complete public SSH key and then shows error message "Not a valid IP address"

      Expected results:

          The input field should validate and truncate entered values to a maximum of 45 characters (to accommodate the longest possible valid IPv6-mapped IPv4 representation). Any value exceeding this length, such as a long SSH public key, should be truncated or immediately flagged, and an error message "Not a valid IP address" should be displayed.

      Additional info:

      Maximum Character Lengths
      
      IPv4 Address: 15 characters.Example: 255.255.255.255 (12 digits + 3 dots).
      
      IPv6 Address (Standard): 39 characters.
      Example: ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff (32 hex digits + 7 colons).
      
      IPv6 Address (IPv4-Mapped): 45 characters.This is a special format used to represent IPv4 addresses within IPv6.
      Example: 0000:0000:0000:0000:0000:ffff:192.168.100.228 (29 IPv6 chars + 1 colon + 15 IPv4 chars). 

              rh-ee-eaharoni Elay Aharoni
              ppinjark@redhat.com Pawan Pinjarkar
              None
              None
              Vladislav Kolodny Vladislav Kolodny
              None
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: