Browse Source

Fixed paste edits not working if no password submitted

pull/111/head
Teknikode 3 years ago
parent
commit
f42547174a
  1. 3
      Teknik/Areas/Paste/Controllers/PasteController.cs

3
Teknik/Areas/Paste/Controllers/PasteController.cs

@ -353,7 +353,8 @@ namespace Teknik.Areas.Paste.Controllers @@ -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;

Loading…
Cancel
Save