Parsing os-release has incorrect quotes handling #77
Labels
No labels
bug
dependency
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
review-next
security
stub
tool
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: raito/lanzaboote#77
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
os-release has more syntax complexity than what we currently handle. Particularly entries with quotes in them will be handled the wrong way.
I think it is better now, but still not quite there. We should check what systemd-stub does for reference. My issues are that we accept things that are forbidden by the "spec":
Shell special characters ("$", quotes, backslash, backtick) must be escaped with backslashes, following shell style.
So you want to error out if the parser encounters a shell special character that is not escaped?
I actually think a lenient parser is more appreciated by the user while not introducing any (security) issues
We should try to emulate what systemd-stub does. In any case, we should document where we deviate from the "specification".
@blitz I'd like to help in this issue, a first step would be to take a look at
systemd-stub
's source code for parsingos-release
? And start writing WIP documentation ?By "spec", which spec are you referencing here ? Bootspec ?
I would argue that it would be better to implement the format properly while referring to the upstream documentation.
Redoing documentation will just get us documentation that will bitrot.
The specification for os-release scheme.
I spoke a bit with systemd upstream, the true "spec" is the code and until there's some stuff to automate sync between "spec" (manpage) and code (true spec), there should be no expectation we have specification.
In practice, the spirit of os-release is subset of Bourne shell without interpolation or variable assignment. As long as we are not too far from this, I would not prioritize this.
Thanks for the update, is there any issue tracking an effort of having a better spec as a whole (i.e. issue tracking work on manpage "spec" that is trying to become closer and closer/more compliant with code "spec" in upstream systemd) to this day, so that, we could know when we could start prioritizing this work ?