Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent Null entry in CompatibleKSPVersions #2707

Merged

Conversation

politas
Copy link
Member

@politas politas commented Mar 29, 2019

CKAN treats a null KSP version in a modversion as "Any", so that a .ckan file with no version information does what we would expect.

The CompatibleKSPVersions dialog allows users to add arbitrary version strings, and then uses the same KSP version parsing that we use for calculating modversion compatibility. This results in a null return value for the text string "any", which does not get caught as an invalid string, allowing the JSON file to be saved with a entry in the CompatibleVersionsList.

On next launch of CKAN, the null entry causes an error.

Now, attempts to add the string "any" to the CompatibleKSPVersionsList are captured and prevented.

Closes #2705

@politas
Copy link
Member Author

politas commented Mar 29, 2019

@DasSkelett, could you review this?

@politas politas added Bug Easy This is easy to fix GUI Issues affecting the interactive GUI labels Mar 29, 2019
@DasSkelett
Copy link
Member

Looks good to me!

@politas politas merged commit 7a079a8 into KSP-CKAN:master Mar 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Easy This is easy to fix GUI Issues affecting the interactive GUI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants