mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-26 12:08:37 +08:00
Compare commits
4 Commits
copilot/fi
...
v1.78.2-de
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e23b3d76b1 | ||
|
|
31314c19f6 | ||
|
|
706b1b5659 | ||
|
|
7ec5eb8467 |
@@ -6,7 +6,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageVersion Include="AWSSDK.Core" Version="4.0.3.15" />
|
<PackageVersion Include="AWSSDK.Core" Version="4.0.3.15" />
|
||||||
<PackageVersion Include="AWSSDK.EC2" Version="4.0.76.1" />
|
<PackageVersion Include="AWSSDK.EC2" Version="4.0.77" />
|
||||||
<PackageVersion Include="BouncyCastle.Cryptography" Version="2.6.2" />
|
<PackageVersion Include="BouncyCastle.Cryptography" Version="2.6.2" />
|
||||||
<PackageVersion Include="Castle.Core" Version="5.2.1" />
|
<PackageVersion Include="Castle.Core" Version="5.2.1" />
|
||||||
<PackageVersion Include="ConsoleControl" Version="1.3.0" />
|
<PackageVersion Include="ConsoleControl" Version="1.3.0" />
|
||||||
|
|||||||
@@ -64,9 +64,7 @@ namespace mRemoteNG.App
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(downloadUrl) &&
|
Process.Start(new ProcessStartInfo(fileName: downloadUrl) { UseShellExecute = true });
|
||||||
downloadUrl.StartsWith("https://", StringComparison.OrdinalIgnoreCase))
|
|
||||||
Process.Start(new ProcessStartInfo(fileName: downloadUrl) { UseShellExecute = true });
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -127,6 +127,10 @@ namespace mRemoteNG.UI.Forms.OptionsPages
|
|||||||
Properties.OptionsUpdatesPage.Default.UpdateProxyAuthUser = txtProxyUsername.Text;
|
Properties.OptionsUpdatesPage.Default.UpdateProxyAuthUser = txtProxyUsername.Text;
|
||||||
LegacyRijndaelCryptographyProvider cryptographyProvider = new();
|
LegacyRijndaelCryptographyProvider cryptographyProvider = new();
|
||||||
Properties.OptionsUpdatesPage.Default.UpdateProxyAuthPass = cryptographyProvider.Encrypt(txtProxyPassword.Text, Runtime.EncryptionKey);
|
Properties.OptionsUpdatesPage.Default.UpdateProxyAuthPass = cryptographyProvider.Encrypt(txtProxyPassword.Text, Runtime.EncryptionKey);
|
||||||
|
|
||||||
|
// Mark that the user has explicitly configured their update preference so the
|
||||||
|
// first-run preference prompt does not appear again.
|
||||||
|
Properties.OptionsUpdatesPage.Default.CheckForUpdatesAsked = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void LoadRegistrySettings()
|
public override void LoadRegistrySettings()
|
||||||
|
|||||||
@@ -416,6 +416,15 @@ namespace mRemoteNG.UI.Forms
|
|||||||
if (!CommonRegistrySettings.AllowCheckForUpdatesAutomatical) return;
|
if (!CommonRegistrySettings.AllowCheckForUpdatesAutomatical) return;
|
||||||
|
|
||||||
if (Properties.OptionsUpdatesPage.Default.CheckForUpdatesAsked) return;
|
if (Properties.OptionsUpdatesPage.Default.CheckForUpdatesAsked) return;
|
||||||
|
|
||||||
|
// If the user has already explicitly disabled automatic updates via settings, don't ask again
|
||||||
|
if (!Properties.OptionsUpdatesPage.Default.CheckForUpdatesOnStartup)
|
||||||
|
{
|
||||||
|
Properties.OptionsUpdatesPage.Default.CheckForUpdatesAsked = true;
|
||||||
|
Properties.OptionsUpdatesPage.Default.Save();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
string[] commandButtons =
|
string[] commandButtons =
|
||||||
[
|
[
|
||||||
Language.AskUpdatesCommandRecommended,
|
Language.AskUpdatesCommandRecommended,
|
||||||
@@ -425,16 +434,25 @@ namespace mRemoteNG.UI.Forms
|
|||||||
|
|
||||||
CTaskDialog.ShowTaskDialogBox(this, GeneralAppInfo.ProductName, Language.AskUpdatesMainInstruction, string.Format(Language.AskUpdatesContent, GeneralAppInfo.ProductName), "", "", "", "", string.Join(" | ", commandButtons), ETaskDialogButtons.None, ESysIcons.Question, ESysIcons.Question);
|
CTaskDialog.ShowTaskDialogBox(this, GeneralAppInfo.ProductName, Language.AskUpdatesMainInstruction, string.Format(Language.AskUpdatesContent, GeneralAppInfo.ProductName), "", "", "", "", string.Join(" | ", commandButtons), ETaskDialogButtons.None, ESysIcons.Question, ESysIcons.Question);
|
||||||
|
|
||||||
if (CTaskDialog.CommandButtonResult == 0 | CTaskDialog.CommandButtonResult == 1)
|
if (CTaskDialog.CommandButtonResult == 0)
|
||||||
{
|
{
|
||||||
|
// Use Recommended Settings: enable automatic updates with the default frequency
|
||||||
|
Properties.OptionsUpdatesPage.Default.CheckForUpdatesOnStartup = true;
|
||||||
|
if (Properties.OptionsUpdatesPage.Default.CheckForUpdatesFrequencyDays < 1)
|
||||||
|
Properties.OptionsUpdatesPage.Default.CheckForUpdatesFrequencyDays = 14;
|
||||||
Properties.OptionsUpdatesPage.Default.CheckForUpdatesAsked = true;
|
Properties.OptionsUpdatesPage.Default.CheckForUpdatesAsked = true;
|
||||||
|
Properties.OptionsUpdatesPage.Default.Save();
|
||||||
}
|
}
|
||||||
|
else if (CTaskDialog.CommandButtonResult == 1)
|
||||||
if (CTaskDialog.CommandButtonResult != 1) return;
|
{
|
||||||
|
// Customize: let the user configure update settings manually, then open Options
|
||||||
AppWindows.Show(WindowType.Options);
|
Properties.OptionsUpdatesPage.Default.CheckForUpdatesAsked = true;
|
||||||
if (AppWindows.OptionsFormWindow != null)
|
Properties.OptionsUpdatesPage.Default.Save();
|
||||||
AppWindows.OptionsFormWindow.SetActivatedPage(Language.Updates);
|
AppWindows.Show(WindowType.Options);
|
||||||
|
if (AppWindows.OptionsFormWindow != null)
|
||||||
|
AppWindows.OptionsFormWindow.SetActivatedPage(Language.Updates);
|
||||||
|
}
|
||||||
|
// For "Ask Later" (button 2), CheckForUpdatesAsked remains false so the dialog will show again next startup
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task CheckForUpdates()
|
private async Task CheckForUpdates()
|
||||||
|
|||||||
@@ -204,11 +204,6 @@ namespace mRemoteNG.UI.Menu
|
|||||||
|
|
||||||
private static void OpenUrl(string url)
|
private static void OpenUrl(string url)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrWhiteSpace(url) ||
|
|
||||||
(!url.StartsWith("https://", StringComparison.OrdinalIgnoreCase) &&
|
|
||||||
!url.StartsWith("http://", StringComparison.OrdinalIgnoreCase)))
|
|
||||||
return;
|
|
||||||
|
|
||||||
var startInfo = new ProcessStartInfo
|
var startInfo = new ProcessStartInfo
|
||||||
{
|
{
|
||||||
FileName = url,
|
FileName = url,
|
||||||
|
|||||||
@@ -99,13 +99,6 @@ namespace mRemoteNG.UI.Window
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Only allow http/https URLs to prevent exploitation via custom URI schemes
|
|
||||||
if (!linkUri.Scheme.Equals("https", StringComparison.OrdinalIgnoreCase) &&
|
|
||||||
!linkUri.Scheme.Equals("http", StringComparison.OrdinalIgnoreCase))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var startInfo = new ProcessStartInfo
|
var startInfo = new ProcessStartInfo
|
||||||
{
|
{
|
||||||
FileName = linkUri.ToString(),
|
FileName = linkUri.ToString(),
|
||||||
|
|||||||
Reference in New Issue
Block a user