Bug 1332297
| Summary: | strip leading or trailing whitespaces on ip and user when adding a provider | ||
|---|---|---|---|
| Product: | Red Hat CloudForms Management Engine | Reporter: | Chris Pelland <cpelland> |
| Component: | UI - OPS | Assignee: | Aparna Karve <akarve> |
| Status: | CLOSED ERRATA | QA Contact: | Nandini Chandra <nachandr> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 5.5.0 | CC: | akarve, cpelland, dajohnso, emarquez, hkataria, jhardy, jocarter, jprause, mfeifer, mpovolny, nachandr, obarenbo |
| Target Milestone: | GA | Keywords: | ZStream |
| Target Release: | 5.5.5 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Fixed In Version: | 5.5.5.0 | Doc Type: | Bug Fix |
| Doc Text: |
In the previous version of CloudForms, the user interface allowed a blank space to be accepted in the IP, FQDN, and user dialogs when adding a provider. This fix updates the detect_spaces directive, which has resolved the issue.
|
Story Points: | --- |
| Clone Of: | 1318762 | Environment: | |
| Last Closed: | 2016-07-26 15:33:22 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | 1318762 | ||
| Bug Blocks: | |||
|
Comment 1
CFME Bot
2016-06-27 16:47:33 UTC
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 |