-
Notifications
You must be signed in to change notification settings - Fork 832
Description
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:
- Go to Settings -> Image Registry.
- Select Use Custom Values.
- In the "Custom Image Registry" field, type some random text like
not-a-url. - Click Save.
- 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.