New commit detected on cfme/5.5.z: https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=a8c1d56236ad17ca2b86939432c076c8d4d9d45a commit a8c1d56236ad17ca2b86939432c076c8d4d9d45a Author: Aparna Karve <akarve> AuthorDate: Mon May 2 13:19:07 2016 -0700 Commit: Aparna Karve <akarve> CommitDate: Fri Jun 24 16:09:26 2016 -0700 Use detect_spaces directive for ems_cloud https://bugzilla.redhat.com/show_bug.cgi?id=1332297 app/assets/javascripts/directives/detect_spaces.js | 17 +++++++ .../_auth_credentials_angular_bootstrap.html.haml | 8 +++- .../views/ems_common/angular/_form.html.haml | 54 +++++++++++++--------- 3 files changed, 56 insertions(+), 23 deletions(-) create mode 100644 app/assets/javascripts/directives/detect_spaces.js
New commit detected on cfme/5.5.z: https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=07d2c38b2b3b80af68335ed5a812785933f67ac3 commit 07d2c38b2b3b80af68335ed5a812785933f67ac3 Merge: 1e34af1 7ad1a57 Author: Dan Clarizio <dclarizi> AuthorDate: Mon Jun 27 12:44:35 2016 -0400 Commit: Dan Clarizio <dclarizi> CommitDate: Mon Jun 27 12:44:35 2016 -0400 Merge branch 'bz1332297_strip_spaces' into '5.5.z' Strip spaces in key form fields like hostname, port, userid 1. For `ems_cloud`, we used a directive `detect_spaces` to block form submission in case if there are spaces detected in hostname, port, userid fields. This was possible because `ems_cloud` is an angular form in 5.5.z 2. For non-angular forms like `ems_infra`, the `.strip` method was used to strip spaces. https://bugzilla.redhat.com/show_bug.cgi?id=1332297 An upstream PR for the `detect_spaces` directive was created here -> https://github.com/ManageIQ/manageiq/pull/8398 This is 100% manually created fix (no cherry-picks). The above PR was used as a reference for creating the directive and the spec. See merge request !992 app/assets/javascripts/directives/detect_spaces.js | 17 +++++++ app/controllers/ems_common.rb | 10 ++-- .../_auth_credentials_angular_bootstrap.html.haml | 8 +++- .../views/ems_common/angular/_form.html.haml | 54 +++++++++++++--------- spec/javascripts/directives/detect_spaces_spec.js | 31 +++++++++++++ spec/javascripts/support/jasmine.yml | 1 + 6 files changed, 93 insertions(+), 28 deletions(-)
It looks like the leading and trailing spaces still don't get stripped in the 'Name' field.
Nandini, The spaces are stripped only for fields like hostname, username ... since a space in those fields would make them invalid right away. We do not strip spaces for the 'Name' field. Thanks, Aparna
Verified in 5.5.5
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2016-1488.html