Skip to content

Commit b67d0f9

Browse files
committed
Update mutex, change minimum OS version
1 parent 4e0600d commit b67d0f9

File tree

6 files changed

+22
-12
lines changed

6 files changed

+22
-12
lines changed

Guard.Core/Guard.Core.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
<TargetFramework>net8.0-windows10.0.22621.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
7-
<SupportedOSPlatformVersion>10.0.18362.0</SupportedOSPlatformVersion>
7+
<SupportedOSPlatformVersion>10.0.17763.0</SupportedOSPlatformVersion>
88
<DebugType>embedded</DebugType>
99
<Authors>Timo Kössler and Open Source Contributors</Authors>
1010
<Title>Guard.Core</Title>
11-
<Version>1.5.1</Version>
11+
<Version>1.5.2</Version>
1212
<Copyright>$(Authors)</Copyright>
1313
<PackageProjectUrl>https://2faguard.app</PackageProjectUrl>
1414
<FileVersion>$(Version)</FileVersion>

Guard.Core/InstallationContext.cs

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
namespace Guard.Core
1+
using System.Security.Cryptography;
2+
using System.Text;
3+
using Guard.Core.Security;
4+
5+
namespace Guard.Core
26
{
37
public enum InstallationType
48
{
@@ -110,16 +114,22 @@ public static string GetAppEditionString()
110114

111115
public static string GetMutexName()
112116
{
117+
string prefix = "2FAGuard-";
118+
// Used for Mutex to allow multiple users on the same machine or multiple portable installations to run at the same time
119+
string hashContent = Environment.UserDomainName + Environment.UserName;
120+
113121
if (installationType == InstallationType.CLASSIC_PORTABLE)
114122
{
115-
return "2FAGuardPortable";
123+
prefix = "2FAGuardPortable-";
124+
hashContent += AppContext.BaseDirectory;
116125
}
117126
else if (installationType == InstallationType.MICROSOFT_STORE)
118127
{
119-
return "2FAGuardStore";
128+
prefix = "2FAGuardStore-";
120129
}
121130

122-
return "2FAGuard";
131+
return prefix
132+
+ Convert.ToHexString(SHA256.HashData(Encoding.UTF8.GetBytes(hashContent)));
123133
}
124134
}
125135
}

Guard.WPF/App.xaml.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Process process in Process.GetProcessesByName(
106106
return;
107107
}
108108

109-
if (Environment.OSVersion.Version.Build < 18362)
109+
if (Environment.OSVersion.Version.Build < 17763)
110110
{
111111
var uiMessageBox = new Wpf.Ui.Controls.MessageBox
112112
{

Guard.WPF/Guard.WPF.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
<ImplicitUsings>enable</ImplicitUsings>
88
<UseWPF>true</UseWPF>
99
<Title>2FAGuard</Title>
10-
<Version>1.5.1</Version>
10+
<Version>1.5.2</Version>
1111
<Authors>Timo Kössler and Open Source Contributors</Authors>
1212
<Copyright>$(Authors)</Copyright>
1313
<RepositoryType>git</RepositoryType>
1414
<RepositoryUrl>https://github.com/timokoessler/2FAGuard</RepositoryUrl>
1515
<FileVersion>$(Version)</FileVersion>
1616
<ApplicationIcon>totp.ico</ApplicationIcon>
1717
<AssemblyVersion>$(Version)</AssemblyVersion>
18-
<SupportedOSPlatformVersion>10.0.18362.0</SupportedOSPlatformVersion>
18+
<SupportedOSPlatformVersion>10.0.17763.0</SupportedOSPlatformVersion>
1919
<SignAssembly>False</SignAssembly>
2020
<!--<PublishSingleFile>true</PublishSingleFile>-->
2121
<SelfContained>true</SelfContained>

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ The secret keys, the account names and your notes are encrypted using the AEGIS-
3434
Yes, you can export your tokens at any time. Currently you have three options: encrypted 2FAGuard backup, generic TOTP Uri list or Authenticator Pro backup. But it is also possible to export single tokens as QR codes or view the secret key.
3535

3636
**Which devices are supported?**
37-
This app is only available for Windows 10 1903 and higher. For Android I recommend [Authenticator Pro](https://github.com/jamie-mh/AuthenticatorPro) that is fully compatible with 2FAGuard. It also requires the C++ Redistributable Runtimes by Microsoft to be installed, but they are usually already installed on most systems. If not, the installer will take care of it.
37+
This app is only available for Windows 10 1903 and higher. It also requires the C++ Redistributable Runtimes by Microsoft to be installed, but they are usually already installed on most systems. If not, the installer will take care of it.
3838

3939
**What can I do if I lost my login data?**
4040
If you lost your password and cannot use an additional login method like Windows Hello, you will no longer have access to your tokens. If you want to reset the app and start over, you can delete the app data. Note that this will delete all your tokens and settings. For the Windows Store version, you can delete the app data in the Windows settings under Apps -> 2FAGuard -> Advanced Options -> Reset. If you are using the classic installation, delete the directory C:\Users\%username%\AppData\Local\2FAGuard.

publish/installer.iss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#define MyAppName "2FAGuard"
2-
#define MyAppVersion "1.5.1"
2+
#define MyAppVersion "1.5.2"
33
#define MyAppPublisher "Timo Kössler"
44
#define MyAppURL "https://2faguard.app"
55
#define MyAppExeName "2FAGuard.exe"
@@ -28,7 +28,7 @@ WizardStyle=modern
2828
ArchitecturesAllowed=x64compatible
2929
UninstallDisplayIcon={app}\{#MyAppExeName}
3030
AppCopyright=Timo Kössler and Open Source Contributors
31-
MinVersion=10.0.18362
31+
MinVersion=10.0.17763
3232
ShowLanguageDialog=auto
3333
DisableReadyPage=yes
3434
UsePreviousTasks=yes

0 commit comments

Comments
 (0)