Sanitize inputs for Oolite-manifests.plist
Moderators: winston, another_commander
Sanitize inputs for Oolite-manifests.plist
So we had an issue today where someone accidentally forgot to escape a quote properly and the entire plist became invalid. I think it would be a good idea to make sure that doesn't happen again.
That is not my desk.
I find this lack of milk... disturbing.
I find this lack of milk... disturbing.
- hiran
- Theorethicist
- Posts: 2403
- Joined: Fri Mar 26, 2021 1:39 pm
- Location: a parallel world I created for myself. Some call it a singularity...
Re: Sanitize inputs for Oolite-manifests.plist
Well, that's what syntax errors are about. They can come at runtime.
I think a better aproach would be to harden Oolite so it can handle the situation and guide the user.
What was the outcome BTW? How does Oolite behave is "the entire plist is invalid"?
Sunshine - Moonlight - Good Times - Oolite
Re: Sanitize inputs for Oolite-manifests.plist
It rejects the entire OXP list and defaults to the old one. As for hardening, yeah that's kind of what I meant, maybe I didn't say that clearly enough.
That is not my desk.
I find this lack of milk... disturbing.
I find this lack of milk... disturbing.
- Cmdr James
- Commodore
- Posts: 1357
- Joined: Tue Jun 05, 2007 10:43 pm
- Location: Berlin
Re: Sanitize inputs for Oolite-manifests.plist
Maybe Im a bit OCD about this, but we shouldnt try to work around things like unmatched or wrongly escaped quotes, this is a recipe for flaky half working code which mysteriously stops working from time to time.
We should simply log the error clearly or better provide an easy to use OXP validation tool which supports development by clearly identifying issues.
We should simply log the error clearly or better provide an easy to use OXP validation tool which supports development by clearly identifying issues.
- hiran
- Theorethicist
- Posts: 2403
- Joined: Fri Mar 26, 2021 1:39 pm
- Location: a parallel world I created for myself. Some call it a singularity...
Re: Sanitize inputs for Oolite-manifests.plist
Then I had understood you wrongly. Since you mentioned "ensure this does not happen again" I thought we ensure there are no more OXPs with syntactically wrong plist files. Which is something we should strive for but it is different from hardening Oolite to handle the situation.
Sunshine - Moonlight - Good Times - Oolite