Compare commits

..

5 Commits

Author SHA1 Message Date
renovate[bot]
a4debc961d Update dependency AWSSDK.EC2 to 4.0.78 2026-02-26 03:11:12 +00:00
Dimitrij
e23b3d76b1 Merge pull request #3174 from mRemoteNG/renovate/aws-sdk-net-monorepo
Update dependency AWSSDK.EC2 to 4.0.77
2026-02-25 17:50:25 +00:00
Dimitrij
31314c19f6 Merge pull request #3172 from jcefoli/jc/FixUpdateCheck
Fix Automatic Update Check Running Every Startup & Ignoring Preferences
2026-02-25 17:49:38 +00:00
renovate[bot]
706b1b5659 Update dependency AWSSDK.EC2 to 4.0.77 2026-02-24 21:38:25 +00:00
Joe Cefoli
7ec5eb8467 Fix incorrect update check logic; Prompts every time 2026-02-24 14:56:47 -05:00
6 changed files with 31 additions and 23 deletions

View File

@@ -6,7 +6,7 @@
</PropertyGroup>
<ItemGroup>
<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.78" />
<PackageVersion Include="BouncyCastle.Cryptography" Version="2.6.2" />
<PackageVersion Include="Castle.Core" Version="5.2.1" />
<PackageVersion Include="ConsoleControl" Version="1.3.0" />

View File

@@ -64,9 +64,7 @@ namespace mRemoteNG.App
{
try
{
if (!string.IsNullOrEmpty(downloadUrl) &&
downloadUrl.StartsWith("https://", StringComparison.OrdinalIgnoreCase))
Process.Start(new ProcessStartInfo(fileName: downloadUrl) { UseShellExecute = true });
Process.Start(new ProcessStartInfo(fileName: downloadUrl) { UseShellExecute = true });
}
catch (Exception ex)
{

View File

@@ -127,6 +127,10 @@ namespace mRemoteNG.UI.Forms.OptionsPages
Properties.OptionsUpdatesPage.Default.UpdateProxyAuthUser = txtProxyUsername.Text;
LegacyRijndaelCryptographyProvider cryptographyProvider = new();
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()

View File

@@ -416,6 +416,15 @@ namespace mRemoteNG.UI.Forms
if (!CommonRegistrySettings.AllowCheckForUpdatesAutomatical) 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 =
[
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);
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.Save();
}
if (CTaskDialog.CommandButtonResult != 1) return;
AppWindows.Show(WindowType.Options);
if (AppWindows.OptionsFormWindow != null)
AppWindows.OptionsFormWindow.SetActivatedPage(Language.Updates);
else if (CTaskDialog.CommandButtonResult == 1)
{
// Customize: let the user configure update settings manually, then open Options
Properties.OptionsUpdatesPage.Default.CheckForUpdatesAsked = true;
Properties.OptionsUpdatesPage.Default.Save();
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()

View File

@@ -204,11 +204,6 @@ namespace mRemoteNG.UI.Menu
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
{
FileName = url,

View File

@@ -99,13 +99,6 @@ namespace mRemoteNG.UI.Window
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
{
FileName = linkUri.ToString(),