You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit e5b8bf3
Browse filesBrowse the repository at this point in the historyBrowse files
fix malware blacklist compatibility with SMAPI 4.5.2 and earlier
The revamped blacklist is more compact, which triggers the bug fixed in f090df0 (where syncing a smaller new version corrupts the file). This pads the file to the largest previous blacklist size to avoid the issue.
Copy file name to clipboardExpand all lines: src/SMAPI.Web/BackgroundJobs/MalwareBlacklistJob.cs
+11-1Lines changed: 11 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,10 @@ internal class MalwareBlacklistJob : IBackgroundJob
20
20
/*********
21
21
** Fields
22
22
*********/
23
+
/// <summary>The minimum size in bytes for the generated malware blacklist file.</summary>
24
+
/// <remarks>The generated file is padded to this length, to avoid a bug in SMAPI 4.5.2 and earlier where a smaller newer version corrupts the file (since it overwrites the previous file without truncating).</remarks>
25
+
privateconstintMinBlacklistBytes=8589;
26
+
23
27
/// <summary>The HTTP client for fetching data from GitHub.</summary>
24
28
privatereadonlyIGitHubClientGitHubClient;
25
29
@@ -64,6 +68,7 @@ public async Task RunAsync(PerformContext? context)
64
68
MalwareBlacklistConfigconfig=this.Config.Value;
65
69
stringrepo=config.GitHubRepo??thrownewInvalidOperationException("Can't update the malware blacklist: no GitHub repository is configured.");
0 commit comments