|
|
c659c5 |
From 628ee708464ee3d266609167c48e92f883849e4d Mon Sep 17 00:00:00 2001
|
|
|
c659c5 |
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
|
c659c5 |
Date: Mon, 30 Jan 2023 09:01:38 +0000
|
|
|
c659c5 |
Subject: [PATCH] -o kubevirt: Replace PCRE ~anchored with ^...$
|
|
|
c659c5 |
|
|
|
c659c5 |
Because this regexp was not anchored at both ends it would still
|
|
|
c659c5 |
report a match for incorrect names.
|
|
|
c659c5 |
|
|
|
c659c5 |
Fixes: commit 8a9c914544a49bed13eb5baf42290f835bdee7b5
|
|
|
c659c5 |
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2162332
|
|
|
c659c5 |
Reported-by: Ming Xie
|
|
|
c659c5 |
|
|
|
c659c5 |
Cherry picked from commit 050a0ba714ddf2a5d81515c886032016aa75342c.
|
|
|
c659c5 |
I did not include the update to the common module since picking that
|
|
|
c659c5 |
would pull in the large changes made to the virtio driver code.
|
|
|
c659c5 |
---
|
|
|
c659c5 |
output/output_kubevirt.ml | 4 ++--
|
|
|
c659c5 |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
c659c5 |
|
|
|
c659c5 |
diff --git a/output/output_kubevirt.ml b/output/output_kubevirt.ml
|
|
|
c659c5 |
index ee89fdbf..fdf0f279 100644
|
|
|
c659c5 |
--- a/output/output_kubevirt.ml
|
|
|
c659c5 |
+++ b/output/output_kubevirt.ml
|
|
|
c659c5 |
@@ -31,8 +31,8 @@ open Create_kubevirt_yaml
|
|
|
c659c5 |
|
|
|
c659c5 |
(* Valid output names for Kubevirt (RHBZ#2162332). *)
|
|
|
c659c5 |
let rfc1123_re =
|
|
|
c659c5 |
- PCRE.compile ~anchored:true
|
|
|
c659c5 |
- "[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*"
|
|
|
c659c5 |
+ PCRE.compile
|
|
|
c659c5 |
+ "^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$"
|
|
|
c659c5 |
|
|
|
c659c5 |
module Kubevirt = struct
|
|
|
c659c5 |
type poptions = bool * output_allocation * string * string * string
|