Skip to content

Commit

Permalink
don't allow update manifests before SMAPI 4.0.0 until the feature is …
Browse files Browse the repository at this point in the history
…released
  • Loading branch information
Pathoschild committed Jan 29, 2023
1 parent 3eb98b5 commit d609294
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/SMAPI.Web/Controllers/ModsApiController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,12 @@ private async Task<ModEntryModel> GetModData(ModSearchEntryModel search, WikiMod
foreach (UpdateKey updateKey in updateKeys)
{
// validate update key
if (!updateKey.LooksValid)
if (
!updateKey.LooksValid
#if SMAPI_DEPRECATED
|| (updateKey.Site == ModSiteKey.UpdateManifest && apiVersion?.IsNewerThan("4.0.0-alpha") != true) // 4.0-alpha feature, don't make available to released mods in case it changes before release
#endif
)
{
errors.Add($"The update key '{updateKey}' isn't in a valid format. It should contain the site key and mod ID like 'Nexus:541', with an optional subkey like 'Nexus:541@subkey'.");
continue;
Expand Down

0 comments on commit d609294

Please sign in to comment.