Bug 8721 - We are not validating machine input
Summary: We are not validating machine input
Status: RESOLVED FIXED
Alias: None
Product: Toaster
Classification: Build System, Metadata & Runtime
Component: toaster (show other bugs)
Version: 2.0
Hardware: x86 Multiple
: Low minor
Target Milestone: 2.3 M4
Assignee: Awais
QA Contact: Libertad
URL:
Whiteboard: GUI design available
Depends on:
Blocks:
 
Reported: 2015-11-24 10:50 UTC by Belen Barros Pena
Modified: 2017-04-05 23:38 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
Design - Validating machine input (186.49 KB, application/pdf)
2015-11-24 10:52 UTC, Belen Barros Pena
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Belen Barros Pena 2015-11-24 10:50:39 UTC
When you type the machine name in the project configuration page, instead of selecting a suggestion from the type ahead, we should be checking that the machine name does not include spaces. Right now, you can type any spaces you want in there and save the invalid machine.
Comment 1 Belen Barros Pena 2015-11-24 10:52:32 UTC
Created attachment 2866 [details]
Design - Validating machine input
Comment 2 Belen Barros Pena 2016-02-15 14:45:53 UTC
I was asked to check if I could still reproduce this, and unfortunately I can. This is what's possible:

1. You can type a space in the middle of a valid machine name and save
2. You can type a space after a valid machine name and save
3. You can type a space before a valid machine name and save

In all 3 cases, your builds will fail during sanity checks:

 OE-core's config sanity checker detected a potential misconfiguration.
    Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
    Following is the list of potential problems / advisories:

    Please set a valid MACHINE in your local.conf or environment

We should remove any spaces before or after the machine name on saving (2 and 3 above). To deal with 1, see the attached design document.
Comment 3 Belen Barros Pena 2016-04-25 14:05:08 UTC
Part of the "UI cleaning" work. Moving to 2.2
Comment 4 Awais 2017-02-27 12:19:33 UTC
Submitted https://patchwork.openembedded.org/patch/137645/
Comment 5 David Reyna 2017-03-08 03:00:39 UTC
I have tested this patch and it passes all three of Belen's test cases for me.

My only surprise was that when you insert a space in front you will probably not see the error message because it is hidden behind the lookahead options. If you click to the side, the lookahead disappears and the error message is then visible.

To me this acceptable,since the red halo around the entry is visible and the Save button is indeed disabled. Disappearing the lookahead is just a nice-to-have.
Comment 6 David Reyna 2017-04-05 23:38:36 UTC
Patch sent upstream.