| Summary: | Under Project->Bitbake variable, We disallow variables with a '/' in them | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] Toaster | Reporter: | brian avery <brian.avery> |
| Component: | toaster | Assignee: | Belen Barros Pena <belen.barros.pena> |
| Status: | RESOLVED FIXED | QA Contact: | Libertad <libertad.gonzalez.de.la.cruz> |
| Severity: | normal | ||
| Priority: | Medium | CC: | belen.barros.pena, bluelightning, jessica.zhang, ross.burton, stanciux.mihail |
| Version: | 2.0 | ||
| Target Milestone: | 2.2 M4 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | Yes (doc changes required) | |
|
Description
brian avery
2016-05-09 23:00:13 UTC
+ is allowed and used in recipe names, so it needs to be allowed in variable names here too (since it can therefore appear in a valid _pn- override). so, it's / and + so far. Any other special character we ought to allow? What about not restricting the inputs? If they put in an unparseable variable, the error message should be clear, I would think. (In reply to comment #3) > What about not restricting the inputs? If they put in an unparseable > variable, the error message should be clear, I would think. mmm, personally I don't like the approach. The CLI already let's you shoot yourself in the foot: we don't need the GUI to do that too. Most special characters are probably not allowed in OE variables (or so I was told when I designed that page). If that's the case, let's validate user input, as good web forms should. Turns out there is an answer to this in BitBake http://git.openembedded.org/bitbake/tree/lib/bb/parse/parse_py/ConfHandler.py#n33 According to RP, (?P<var>[a-zA-Z0-9\-~_+.${}/]+?) is the key bit. It implies a-zA-Z0-9\-~_+.${}/ are all acceptable So here is our answer: those are the special characters the validation should allow. Agreed. Your's is better. Patch submitted to the mailing list https://lists.yoctoproject.org/pipermail/toaster/2016-September/005164.html Merged in bitbake 146f6f95a8753308edb31e952d7c440c8de11870. |