diff --git a/AppHarbor.Web.Security/CookieAuthenticator.cs b/AppHarbor.Web.Security/CookieAuthenticator.cs index c3dd157..8f72a7a 100644 --- a/AppHarbor.Web.Security/CookieAuthenticator.cs +++ b/AppHarbor.Web.Security/CookieAuthenticator.cs @@ -50,6 +50,7 @@ public void SignOut() _context.Response.Cookies.Add(new HttpCookie(_configuration.CookieName, "") { Expires = DateTime.UtcNow.AddMonths(-100), + Domain = _configuration.Domain }); } diff --git a/AppHarbor.Web.Security/SymmetricEncryption.cs b/AppHarbor.Web.Security/SymmetricEncryption.cs index e376351..b3713a0 100644 --- a/AppHarbor.Web.Security/SymmetricEncryption.cs +++ b/AppHarbor.Web.Security/SymmetricEncryption.cs @@ -33,17 +33,7 @@ public override byte[] Encrypt(byte[] valueBytes, byte[] initializationVector) { initializationVector = new byte[_algorithm.BlockSize / 8]; var rng = RandomNumberGenerator.Create(); - try - { - rng.GetBytes(initializationVector); - } - finally - { - if (rng != null) - { - ((IDisposable)rng).Dispose(); - } - } + rng.GetBytes(initializationVector); } using (var output = new MemoryStream())