From a0e8b83c100a735816bf9eed819a5ceecbacef73 Mon Sep 17 00:00:00 2001 From: Taras Kostyuk Date: Tue, 13 Sep 2016 12:26:04 +0300 Subject: [PATCH] More strict regex for UI URL fields Closes-Bug: #1621898 The regex added by this commit is taken from https://github.com/openstack/fuel-ui/blob/stable/mitaka/static/views/custom_controls.js#L72 which is regex used for validating Repositories URI in Fuel UI. Change-Id: Id9387135260822f2e1b5527f432fc9e30512f2f2 --- environment_config.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/environment_config.yaml b/environment_config.yaml index 2ac3cc8..7ca74a1 100644 --- a/environment_config.yaml +++ b/environment_config.yaml @@ -73,7 +73,7 @@ attributes: weight: 53 value: '' regex: - source: '^.+@(.*\..+)+$' + source: '^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$' error: 'Please enter correct e-mail address' gcs_client_id: label: "Client ID" @@ -91,7 +91,7 @@ attributes: weight: 55 value: 'https://accounts.google.com/o/oauth2/auth' regex: - source: '^https:\/\/.+$' + source: '\w+:\/\/[\w\-.\/]+(?::\d+)?[\w\-.\/]+$' error: 'Please enter valid URI' gcs_token_uri: label: "Token URI" @@ -100,7 +100,7 @@ attributes: weight: 56 value: 'https://accounts.google.com/o/oauth2/token' regex: - source: '^https:\/\/.+$' + source: '\w+:\/\/[\w\-.\/]+(?::\d+)?[\w\-.\/]+$' error: 'Please enter valid URI' gcs_auth_provider_x509_cert_url: label: "Auth Provider X509 Cert URL" @@ -109,7 +109,7 @@ attributes: weight: 57 value: 'https://www.googleapis.com/oauth2/v1/certs' regex: - source: '^https:\/\/.+$' + source: '\w+:\/\/[\w\-.\/]+(?::\d+)?[\w\-.\/]+$' error: 'Please enter valid URI' gcs_client_x509_cert_url: label: "Client X509 Cert URL" @@ -118,7 +118,7 @@ attributes: weight: 58 value: '' regex: - source: '^https:\/\/.+$' + source: '\w+:\/\/[\w\-.\/]+(?::\d+)?[\w\-.\/%]+$' error: 'Please enter valid URI' backup_gcs_advanced_settings: type: "checkbox"