Skip to content

Commit

Permalink
Correct bug parsing QR code images
Browse files Browse the repository at this point in the history
Fixes #56
  • Loading branch information
Rookiestyle committed Jun 9, 2021
1 parent b2407d0 commit 6c49b6c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/KeePassOTP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ private void SetOTPAuthString(ProtectedString value)

string encoding = parameters.Get("encoding");
if (!string.IsNullOrEmpty(encoding)) encoding = encoding.ToLowerInvariant();
Encoding = KPOTPEncoding.BASE32;
if (encoding == "base64") Encoding = KPOTPEncoding.BASE64;
else if (encoding == "hex") Encoding = KPOTPEncoding.HEX;
else if (encoding == "utf8") Encoding = KPOTPEncoding.UTF8;
Expand Down
4 changes: 4 additions & 0 deletions src/KeePassOTPSetup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,9 @@ private void pbQR_DragDrop(object sender, DragEventArgs e)
if (IsValidOtpAuth(otp))
{
OTP.OTPAuthString = otp;
m_NoUpdate = true;
InitSettings(true);
m_NoUpdate = false;
}
}

Expand Down Expand Up @@ -497,7 +499,9 @@ private bool SearchScreenForQRCode(int iSeconds)
if (IsValidOtpAuth(otp))
{
OTP.OTPAuthString = otp;
m_NoUpdate = true;
InitSettings(true);
m_NoUpdate = false;
return true;
}
if (pbSearchScreen.Text == PluginTranslate.ReadScreenForQRCode) return false;
Expand Down
4 changes: 2 additions & 2 deletions src/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.28")]
[assembly: AssemblyFileVersion("0.28")]
[assembly: AssemblyVersion("0.28.1")]
[assembly: AssemblyFileVersion("0.28.1")]
2 changes: 1 addition & 1 deletion version.info
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:
KeePassOTP:0.28
KeePassOTP:0.28.1
KeePassOTP!de:16
KeePassOTP!fr:6
KeePassOTP!pt:5
Expand Down

0 comments on commit 6c49b6c

Please sign in to comment.