Skip to content

[Bug]: Image Registry form lacks validation and accepts invalid input URLs #5421

@Maximus-08

Description

@Maximus-08

What happened:
I was exploring the Image Registry settings and noticed that I could save a registry with a completely invalid URL.

I entered broken-url-no-http as the registry server, and the UI gave me a green "Successfully updated" message. It seems the form doesn't check if the input is actually a valid URL before saving it.

What you expected to happen:
The form should validate the input. It should prevent saving if the URL doesn't look right (e.g., missing http/https or invalid characters).

Where can this issue be corrected?:
chaoscenter/web/src/views/ImageRegistry/ImageRegistry.tsx

How to reproduce it:

  1. Go to Settings -> Image Registry.
  2. Select Use Custom Values.
  3. In the "Custom Image Registry" field, type some random text like not-a-url.
  4. Click Save.
  5. You'll see it saves successfully without any error.

Anything else we need to know?
I took a quick look at chaoscenter/web/src/views/ImageRegistry/ImageRegistry.tsx and noticed the Formik component is missing the validationSchema prop. Other forms in the app use Yup for this, so we probably just need to add that here.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions