From f42547174af621321f3329f47c5f834e26820894 Mon Sep 17 00:00:00 2001 From: Uncled1023 Date: Mon, 4 Feb 2019 20:44:29 -0800 Subject: [PATCH] Fixed paste edits not working if no password submitted --- Teknik/Areas/Paste/Controllers/PasteController.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Teknik/Areas/Paste/Controllers/PasteController.cs b/Teknik/Areas/Paste/Controllers/PasteController.cs index 1ebadd1..0a56c1c 100644 --- a/Teknik/Areas/Paste/Controllers/PasteController.cs +++ b/Teknik/Areas/Paste/Controllers/PasteController.cs @@ -353,7 +353,8 @@ namespace Teknik.Areas.Paste.Controllers paste.IV = iv; paste.BlockSize = _config.PasteConfig.BlockSize; - paste.HashedPassword = PasteHelper.HashPassword(paste.Key, password); + if (!string.IsNullOrEmpty(password)) + paste.HashedPassword = PasteHelper.HashPassword(paste.Key, password); paste.FileName = fileName; paste.Title = model.Title; paste.Syntax = model.Syntax;