Incorrect error message when creating env with invalid name

Bug #1463852 reported by Kirill Zaitsev
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Murano
Fix Released
Medium
Lei Zhang
Kilo
Fix Committed
Undecided
Stan Lagun

Bug Description

Step to reproduce:
1. Navigate to Murano > Application Catalog > Environments
2. Click on 'Create Environment'
3. Enter invalid environment name "!@#$%%$$" and click on "Create"
4. Take a look at error message, it says that "Environment names must contain only alphanumeric or '_-.' characters and must start with alpha "
5. Enter "aaaaa_-." name and click on "Create"

Observed result:
"aaaa_-." name is invalid

Changed in murano:
status: New → Confirmed
tags: added: low-hanging-fruit
Changed in murano:
milestone: none → 2014.2.3
Lei Zhang (lei-a-zhang)
Changed in murano:
assignee: nobody → Lei Zhang (lei-a-zhang)
Revision history for this message
Lei Zhang (lei-a-zhang) wrote :

hi, after checking source code I found the name validator is '^[a-zA-Z]+[\w-]*$', so I guess just fixing help text of the form is OK, no need to change the rule of environment name validation, right?

Changed in murano:
status: Confirmed → In Progress
Revision history for this message
Kirill Zaitsev (kzaitsev) wrote :

You can do both, since you're making regex more permissive — there will be no invalid names in the db, so it's ok to do it both ways.

Changed in murano:
status: In Progress → Fix Committed
Changed in murano:
status: Fix Committed → Fix Released
no longer affects: murano/juno
tags: removed: juno-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to murano-dashboard (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/199117

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to murano-dashboard (stable/kilo)

Reviewed: https://review.openstack.org/199117
Committed: https://git.openstack.org/cgit/openstack/murano-dashboard/commit/?id=52ec9285e60f488fb62291dc1ca6cb9f806f8708
Submitter: Jenkins
Branch: stable/kilo

commit 52ec9285e60f488fb62291dc1ca6cb9f806f8708
Author: leizhang <email address hidden>
Date: Fri Jun 26 21:08:12 2015 +0800

    Fix inconsistency of message and validation when create env(dashboard)

    If you create env with an invalid env name, the error message you get
    conflicts with the rule of validating env name, change the rule to
    adjust to the display message. Two validation rules need to be changed,
    one at murano api, the other at muranodashboard.

    Change-Id: Ib5a8a87cf295586214bced08c99a9e89ae1ee38f
    Closes-bug: #1463852

tags: added: in-stable-kilo
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/murano-dashboard 2015.1.1

This issue was fixed in the openstack/murano-dashboard 2015.1.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

This issue was fixed in the openstack/murano-dashboard 2015.1.1 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.