EDCD / EDCD/EDMarketConnector

Consider some paranoia post-load processing of Status.json

Open
#1,427 0 comments 0 reactions 0 assignees View on GitHub
EDDN EDSM enhancement Inara Plugins
Dominant language
Python
Stars
1.3k
Forks
182
Avg merge
1m
Merged PRs (30d)
1

Description

In #1393 one suspicion is that *maybe* sometimes Status.json has a `BodyName` key but with a `''` value.

We should consider doing some sanity checking on what we load in `dashboard.py:Dashboard.process()`.

1. Filter out any key where the value is an empty string ? Is this ever actually valid ?
2. If somehow a null/None value is in there, the same question
3. Do we definitely want to do this, given it potentially affects third-party plugins? Or maybe just define a utility function for the core plugins to utilise ?

Contributor guide

Open the contributing guide

Research direction

Start in dashboard.py at Dashboard.process() and inspect how Status.json data is loaded and passed to plugins. Determine whether empty-string or None values are valid, and whether filtering belongs in core processing or a utility for core plugins. Done means the validation approach and its effect on third-party plugins are defined and covered by appropriate tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.