From cad7a00b2d063e504b2379004fa346cf304e0f644342501396b2e7ef4b6c2064 Mon Sep 17 00:00:00 2001 From: Alice Brooks Date: Tue, 5 Nov 2024 13:39:25 +0000 Subject: [PATCH] Fix incorrect regex not allowing correct searches bsc#1232687 --- cockpit-podman.changes | 6 ++++++ cockpit-podman.spec | 1 + correct-container-search.patch | 11 +++++++++++ 3 files changed, 18 insertions(+) create mode 100644 correct-container-search.patch diff --git a/cockpit-podman.changes b/cockpit-podman.changes index 645ad33..2a11f4a 100644 --- a/cockpit-podman.changes +++ b/cockpit-podman.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Nov 5 13:02:39 UTC 2024 - Alice Brooks + +- correct-container-search.patch: Fixes issues searching containers + bsc#1232687 + ------------------------------------------------------------------- Fri Aug 9 17:49:45 UTC 2024 - Herbert Graeber diff --git a/cockpit-podman.spec b/cockpit-podman.spec index 162d4d6..4941dc6 100644 --- a/cockpit-podman.spec +++ b/cockpit-podman.spec @@ -28,6 +28,7 @@ Source11: node_modules.spec.inc Source12: update_version.sh %include %_sourcedir/node_modules.spec.inc Patch10: load-css-overrides.patch +Patch11: correct-container-search.patch BuildArch: noarch BuildRequires: appstream-glib Requires: cockpit-bridge >= 138 diff --git a/correct-container-search.patch b/correct-container-search.patch new file mode 100644 index 0000000..0fbae93 --- /dev/null +++ b/correct-container-search.patch @@ -0,0 +1,11 @@ +--- a/src/ImageRunModal.jsx ++++ b/src/ImageRunModal.jsx +@@ -516,7 +516,7 @@ export class ImageRunModal extends React.Component { + } + + // Strip out all non-allowed container image characters when filtering. +- let regexString = searchText.replace(/[^\w_.:-]/g, ""); ++ let regexString = searchText.replace(/[^/\w_.:-]/g, ""); + // Strip image registry option if set for comparing results for docker.io searching for docker.io/fedora + // returns docker.io/$username/fedora for example. + if (regexString.includes('/')) {