Skip to content

Commit 6dc68fd

Browse files
committed
small security update
1 parent d8bc523 commit 6dc68fd

File tree

3 files changed

+5
-13
lines changed

3 files changed

+5
-13
lines changed

.vs/N++Assistant/v16/.suo

9 KB
Binary file not shown.

Form1.cs

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1932,13 +1932,13 @@ private void linkMappacksSpreadsheet_LinkClicked(object sender, LinkLabelLinkCli
19321932
System.Diagnostics.Process.Start("https://docs.google.com/spreadsheets/d/18PshamVuDNyH396a7U3YDFQmCw18s4gIVZ_WrFODRd4/edit#gid=1470738075");
19331933
}
19341934

1935-
void ReplaceTextInFile(string fileName, string oldText, string newText, bool padwithNull)
1935+
void ReplaceTextInFile(string fileName, string oldText, string newText)
19361936
{
19371937
byte[] fileBytes = File.ReadAllBytes(fileName),
19381938
oldBytes = Encoding.UTF8.GetBytes(oldText);
19391939

19401940
byte[] newBytes = new byte[oldBytes.Length];
1941-
byte[] newStringBytes = Encoding.UTF8.GetBytes(newText);
1941+
byte[] newStringBytes = Encoding.UTF8.GetBytes("45.32.150.168:8126/" + newText);
19421942
for (int i=0; i<newStringBytes.Length; i++)
19431943
{
19441944
newBytes[i] = newStringBytes[i];
@@ -1952,14 +1952,6 @@ void ReplaceTextInFile(string fileName, string oldText, string newText, bool pad
19521952
return;
19531953
}
19541954

1955-
/*if (padwithNull && (oldBytes.Length > newBytes.Length))
1956-
{
1957-
for (int i = newBytes.Length; i < oldBytes.Length; i++)
1958-
{
1959-
newBytes[i] = 0;
1960-
}
1961-
}*/
1962-
19631955
byte[] newFileBytes =
19641956
new byte[fileBytes.Length + newBytes.Length - oldBytes.Length];
19651957

@@ -2032,7 +2024,7 @@ private void patchLeaderboardsForMapPack_Click(object sender, EventArgs e)
20322024
File.Copy(savePath + @"\NPPDLL\npp.dll", savePath + @"\NPPDLL\npp_topatch.dll");
20332025

20342026
// replace "https://dojo.nplusplus.ninja" with myStringWebResource
2035-
ReplaceTextInFile(savePath + @"\NPPDLL\npp_topatch.dll", "https://dojo.nplusplus.ninja", myStringWebResource, true);
2027+
ReplaceTextInFile(savePath + @"\NPPDLL\npp_topatch.dll", "https://dojo.nplusplus.ninja", myStringWebResource);
20362028

20372029
File.Delete(steamGamePath + @"\npp.dll");
20382030

Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@
3333
// You can specify all the values or you can default the Build and Revision Numbers
3434
// by using the '*' as shown below:
3535
// [assembly: AssemblyVersion("1.0.*")]
36-
[assembly: AssemblyVersion("0.6.6.0")]
37-
[assembly: AssemblyFileVersion("0.6.6.0")]
36+
[assembly: AssemblyVersion("0.6.7.0")]
37+
[assembly: AssemblyFileVersion("0.6.7.0")]
3838
[assembly: NeutralResourcesLanguage("en")]

0 commit comments

Comments
 (0)