Skip to content

Commit

Permalink
Gracefully handle attempts to signal unauthorised connections
Browse files Browse the repository at this point in the history
  • Loading branch information
luckyrat committed Sep 10, 2017
1 parent d0deb11 commit 9ca08d7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion KeePassRPC/KeePassRPCClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,9 @@ public KeePassRPCClientConnection(IWebSocketConnection connection, bool isAuthor
/// <param name="signal">The signal.</param>
public void Signal(KeePassRPC.DataExchangeModel.Signal signal, string methodName)
{
// User may not have authorised the connection we are trying to signal
if (KeyContainer == null) return;

try
{
Jayrock.Json.JsonObject call = new Jayrock.Json.JsonObject();
Expand Down Expand Up @@ -670,7 +673,7 @@ public JSONRPCContainer Encrypt(string plaintext)
if (string.IsNullOrEmpty(plaintext))
return null;

KeyContainerClass kc = this.KeyContainer;
KeyContainerClass kc = KeyContainer;
SHA1 sha = new SHA1CryptoServiceProvider();

byte[] plaintextBytes = Encoding.UTF8.GetBytes(plaintext);
Expand Down
2 changes: 1 addition & 1 deletion KeePassRPC/KeePassRPCExt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace KeePassRPC
public sealed class KeePassRPCExt : Plugin
{
// version information
public static readonly Version PluginVersion = new Version(1, 7, 2);
public static readonly Version PluginVersion = new Version(1, 7, 3);

public override string UpdateUrl
{
Expand Down
2 changes: 1 addition & 1 deletion KeePassRPC/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@

// Assembly version information
[assembly: AssemblyVersion("2.0.34.*")]
[assembly: AssemblyFileVersion("1.7.2.0")] // also change PluginVersion in KeePassRPCExt.cs!
[assembly: AssemblyFileVersion("1.7.3.0")] // also change PluginVersion in KeePassRPCExt.cs!

0 comments on commit 9ca08d7

Please sign in to comment.