Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed handling of missing libgdiplus #115

Merged
merged 1 commit into from
May 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions Google.Authenticator/MissingDependencyException.cs

This file was deleted.

16 changes: 0 additions & 16 deletions Google.Authenticator/TwoFactorAuthenticator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,22 +96,6 @@ private static string GenerateQrCodeUrl(int qrPixelsPerModule, string provisionU
}

}
catch (TypeInitializationException e)
{
if (e.InnerException != null
&& e.InnerException.GetType() == typeof(DllNotFoundException)
&& e.InnerException.Message.Contains("libgdiplus"))
{
throw new MissingDependencyException(
"It looks like libgdiplus has not been installed - see" +
" https://github.com/codebude/QRCoder/issues/227",
e);
}
else
{
throw;
}
}
catch (System.Runtime.InteropServices.ExternalException e)
{
if (e.Message.Contains("GDI+") && qrPixelsPerModule > 10)
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ bool result = tfa.ValidateTwoFactorPIN(key, txtCode.Text)

## Updates

### 3.0.0-beta1
Removed support for legacy .Net Framework. Lowest supported versions are now netstandard2.0 and .Net 4.6.2.
All use of System.Drawing has been removed. In 2.5, only Net 6.0 avoided System.Drawing.
### 3.0.0-beta
- Removed support for legacy .Net Framework. Lowest supported versions are now netstandard2.0 and .Net 4.6.2.
- All use of System.Drawing has been removed. In 2.5, only Net 6.0 avoided System.Drawing.
- Linux installations no longer need to ensure `libgdiplus` is installed as it is no longer used.

### 2.5.0
Now runs on .Net 6.0.
Expand All @@ -50,4 +51,4 @@ Technically the QR Coder library we rely on still does not fully support .Net 6.
* Don't use the secret key and `ManualEntryKey` interchangeably. `ManualEntryKey` is used to enter into the authenticator app when scanning a QR code is impossible and is derived from the secret key ([discussion example](https://github.com/BrandonPotter/GoogleAuthenticator/issues/54))

# Notes
On linux, you need to ensure `libgdiplus` is installed if you want to generate QR Codes. See [https://github.com/codebude/QRCoder/issues/227](https://github.com/codebude/QRCoder/issues/227).
*With versions prior to 3.0*, on linux, you need to ensure `libgdiplus` is installed if you want to generate QR Codes. See [https://github.com/codebude/QRCoder/issues/227](https://github.com/codebude/QRCoder/issues/227).