Updated GitVersion and Inforno nuget packagestags/2.0.3
@@ -84,8 +84,8 @@ | |||
<HintPath>..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll</HintPath> | |||
<Private>True</Private> | |||
</Reference> | |||
<Reference Include="SecurityDriven.Inferno, Version=1.2.0.0, Culture=neutral, processorArchitecture=MSIL"> | |||
<HintPath>..\packages\Inferno.1.2.0\lib\net452\SecurityDriven.Inferno.dll</HintPath> | |||
<Reference Include="SecurityDriven.Inferno, Version=1.2.1.0, Culture=neutral, processorArchitecture=MSIL"> | |||
<HintPath>..\packages\Inferno.1.2.1\lib\net452\SecurityDriven.Inferno.dll</HintPath> | |||
<Private>True</Private> | |||
</Reference> | |||
<Reference Include="System" /> | |||
@@ -136,12 +136,12 @@ | |||
</COMReference> | |||
</ItemGroup> | |||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | |||
<Import Project="..\packages\GitVersionTask.3.5.3\build\dotnet\GitVersionTask.targets" Condition="Exists('..\packages\GitVersionTask.3.5.3\build\dotnet\GitVersionTask.targets')" /> | |||
<Import Project="..\packages\GitVersionTask.3.5.4\build\dotnet\GitVersionTask.targets" Condition="Exists('..\packages\GitVersionTask.3.5.4\build\dotnet\GitVersionTask.targets')" /> | |||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> | |||
<PropertyGroup> | |||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> | |||
</PropertyGroup> | |||
<Error Condition="!Exists('..\packages\GitVersionTask.3.5.3\build\dotnet\GitVersionTask.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\GitVersionTask.3.5.3\build\dotnet\GitVersionTask.targets'))" /> | |||
<Error Condition="!Exists('..\packages\GitVersionTask.3.5.4\build\dotnet\GitVersionTask.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\GitVersionTask.3.5.4\build\dotnet\GitVersionTask.targets'))" /> | |||
</Target> | |||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. | |||
Other similar extension points exist, see Microsoft.Common.targets. |
@@ -3,8 +3,8 @@ | |||
<package id="BouncyCastle" version="1.8.1" targetFramework="net452" /> | |||
<package id="CommandLineParser" version="1.9.71" targetFramework="net452" /> | |||
<package id="EntityFramework" version="6.1.3" targetFramework="net452" /> | |||
<package id="GitVersionTask" version="3.5.3" targetFramework="net452" developmentDependency="true" /> | |||
<package id="Inferno" version="1.2.0" targetFramework="net452" /> | |||
<package id="GitVersionTask" version="3.5.4" targetFramework="net452" developmentDependency="true" /> | |||
<package id="Inferno" version="1.2.1" targetFramework="net452" /> | |||
<package id="Microsoft.AspNet.Identity.Core" version="2.2.1" targetFramework="net452" /> | |||
<package id="Microsoft.AspNet.Identity.EntityFramework" version="2.2.1" targetFramework="net452" /> | |||
<package id="nClam" version="2.0.6.0" targetFramework="net452" /> |
@@ -65,16 +65,20 @@ namespace Teknik.Areas.Paste.Controllers | |||
// The paste has a password set | |||
if (!string.IsNullOrEmpty(paste.HashedPassword)) | |||
{ | |||
byte[] passBytes = Helpers.SHA384.Hash(paste.Key, password); | |||
string hash = passBytes.ToHex(); | |||
// We need to convert old pastes to the new password scheme | |||
if (paste.Transfers.ToList().Exists(t => t.Type == TransferTypes.ASCIIPassword)) | |||
string hash = string.Empty; | |||
if (!string.IsNullOrEmpty(password)) | |||
{ | |||
hash = Encoding.ASCII.GetString(passBytes); | |||
// Remove the transfer types | |||
paste.Transfers.Clear(); | |||
db.Entry(paste).State = EntityState.Modified; | |||
db.SaveChanges(); | |||
byte[] passBytes = Helpers.SHA384.Hash(paste.Key, password); | |||
hash = passBytes.ToHex(); | |||
// We need to convert old pastes to the new password scheme | |||
if (paste.Transfers.ToList().Exists(t => t.Type == TransferTypes.ASCIIPassword)) | |||
{ | |||
hash = Encoding.ASCII.GetString(passBytes); | |||
// Remove the transfer types | |||
paste.Transfers.Clear(); | |||
db.Entry(paste).State = EntityState.Modified; | |||
db.SaveChanges(); | |||
} | |||
} | |||
if (string.IsNullOrEmpty(password) || hash != paste.HashedPassword) | |||
{ |
@@ -95,8 +95,8 @@ | |||
<HintPath>..\packages\routedebugger.2.1.5\lib\net40\RouteDebugger.dll</HintPath> | |||
<Private>True</Private> | |||
</Reference> | |||
<Reference Include="SecurityDriven.Inferno, Version=1.2.0.0, Culture=neutral, processorArchitecture=MSIL"> | |||
<HintPath>..\packages\Inferno.1.2.0\lib\net452\SecurityDriven.Inferno.dll</HintPath> | |||
<Reference Include="SecurityDriven.Inferno, Version=1.2.1.0, Culture=neutral, processorArchitecture=MSIL"> | |||
<HintPath>..\packages\Inferno.1.2.1\lib\net452\SecurityDriven.Inferno.dll</HintPath> | |||
<Private>True</Private> | |||
</Reference> | |||
<Reference Include="System" /> | |||
@@ -707,12 +707,12 @@ | |||
</FlavorProperties> | |||
</VisualStudio> | |||
</ProjectExtensions> | |||
<Import Project="..\packages\GitVersionTask.3.5.3\build\dotnet\GitVersionTask.targets" Condition="Exists('..\packages\GitVersionTask.3.5.3\build\dotnet\GitVersionTask.targets')" /> | |||
<Import Project="..\packages\GitVersionTask.3.5.4\build\dotnet\GitVersionTask.targets" Condition="Exists('..\packages\GitVersionTask.3.5.4\build\dotnet\GitVersionTask.targets')" /> | |||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> | |||
<PropertyGroup> | |||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> | |||
</PropertyGroup> | |||
<Error Condition="!Exists('..\packages\GitVersionTask.3.5.3\build\dotnet\GitVersionTask.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\GitVersionTask.3.5.3\build\dotnet\GitVersionTask.targets'))" /> | |||
<Error Condition="!Exists('..\packages\GitVersionTask.3.5.4\build\dotnet\GitVersionTask.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\GitVersionTask.3.5.4\build\dotnet\GitVersionTask.targets'))" /> | |||
</Target> | |||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. | |||
Other similar extension points exist, see Microsoft.Common.targets. |
@@ -7,8 +7,8 @@ | |||
<package id="BouncyCastle" version="1.8.1" targetFramework="net452" /> | |||
<package id="EntityFramework" version="6.1.3" targetFramework="net452" userInstalled="true" /> | |||
<package id="FontAwesome" version="4.4.0" targetFramework="net452" userInstalled="true" /> | |||
<package id="GitVersionTask" version="3.5.3" targetFramework="net452" developmentDependency="true" /> | |||
<package id="Inferno" version="1.2.0" targetFramework="net452" userInstalled="true" /> | |||
<package id="GitVersionTask" version="3.5.4" targetFramework="net452" developmentDependency="true" /> | |||
<package id="Inferno" version="1.2.1" targetFramework="net452" userInstalled="true" /> | |||
<package id="jQuery" version="2.2.3" targetFramework="net452" userInstalled="true" /> | |||
<package id="jQuery.Validation" version="1.15.0" targetFramework="net452" userInstalled="true" /> | |||
<package id="MarkdownDeep.Full" version="1.5" targetFramework="net452" /> |