Browse Source

Moved Helpers and Configuration into separate projects. Updated all references to use them as well.

master
Teknikode 5 years ago
parent
commit
56b0063dce
  1. 9
      ServerMaint/Program.cs
  2. 16
      ServerMaint/ServerMaint.csproj
  3. 4
      ServerMaint/packages.config
  4. 20
      Teknik.sln
  5. 2
      Teknik/App_Start/BundleConfig.cs
  6. 2
      Teknik/App_Start/SubdomainRoute.cs
  7. 2
      Teknik/Areas/API/Controllers/APIController.cs
  8. 2
      Teknik/Areas/API/Controllers/APIv1Controller.cs
  9. 2
      Teknik/Areas/About/Views/About/Index.cshtml
  10. 2
      Teknik/Areas/Admin/AdminAreaRegistration.cs
  11. 2
      Teknik/Areas/Admin/Views/Admin/Dashboard.cshtml
  12. 2
      Teknik/Areas/Admin/Views/Admin/Search.cshtml
  13. 2
      Teknik/Areas/Admin/Views/Admin/SearchResult.cshtml
  14. 2
      Teknik/Areas/Admin/Views/Admin/UserInfo.cshtml
  15. 2
      Teknik/Areas/Blog/BlogAreaRegistration.cs
  16. 3
      Teknik/Areas/Blog/Controllers/BlogController.cs
  17. 2
      Teknik/Areas/Blog/Views/Blog/Blog.cshtml
  18. 2
      Teknik/Areas/Blog/Views/Blog/Comment.cshtml
  19. 2
      Teknik/Areas/Blog/Views/Blog/EditPost.cshtml
  20. 2
      Teknik/Areas/Blog/Views/Blog/NewPost.cshtml
  21. 2
      Teknik/Areas/Blog/Views/Blog/Post.cshtml
  22. 2
      Teknik/Areas/Blog/Views/Blog/ViewPost.cshtml
  23. 2
      Teknik/Areas/Contact/ContactAreaRegistration.cs
  24. 2
      Teknik/Areas/Contact/Views/Contact/Index.cshtml
  25. 1
      Teknik/Areas/Dev/Controllers/DevController.cs
  26. 2
      Teknik/Areas/Error/Controllers/ErrorController.cs
  27. 2
      Teknik/Areas/Error/Views/Error/Exception.cshtml
  28. 2
      Teknik/Areas/Error/Views/Error/General.cshtml
  29. 2
      Teknik/Areas/Error/Views/Error/Http403.cshtml
  30. 2
      Teknik/Areas/Error/Views/Error/Http404.cshtml
  31. 2
      Teknik/Areas/Error/Views/Error/Http500.cshtml
  32. 2
      Teknik/Areas/Help/HelpAreaRegistration.cs
  33. 2
      Teknik/Areas/Help/Views/Help/API/API.cshtml
  34. 2
      Teknik/Areas/Help/Views/Help/API/v1/Paste.cshtml
  35. 2
      Teknik/Areas/Help/Views/Help/API/v1/Shorten.cshtml
  36. 2
      Teknik/Areas/Help/Views/Help/API/v1/Upload.cshtml
  37. 2
      Teknik/Areas/Help/Views/Help/Index.cshtml
  38. 2
      Teknik/Areas/Help/Views/Help/Mail.cshtml
  39. 2
      Teknik/Areas/Home/Controllers/HomeController.cs
  40. 3
      Teknik/Areas/Home/HomeAreaRegistration.cs
  41. 2
      Teknik/Areas/Home/Views/Home/Index.cshtml
  42. 4
      Teknik/Areas/Paste/Controllers/PasteController.cs
  43. 2
      Teknik/Areas/Paste/PasteAreaRegistration.cs
  44. 2
      Teknik/Areas/Paste/PasteHelper.cs
  45. 2
      Teknik/Areas/Paste/Views/Paste/Full.cshtml
  46. 2
      Teknik/Areas/Paste/Views/Paste/Index.cshtml
  47. 2
      Teknik/Areas/Paste/Views/Paste/PasswordNeeded.cshtml
  48. 1
      Teknik/Areas/Podcast/Controllers/PodcastController.cs
  49. 2
      Teknik/Areas/Podcast/PodcastAreaRegistration.cs
  50. 2
      Teknik/Areas/Podcast/Views/Podcast/Comment.cshtml
  51. 2
      Teknik/Areas/Podcast/Views/Podcast/Main.cshtml
  52. 2
      Teknik/Areas/Podcast/Views/Podcast/Podcast.cshtml
  53. 2
      Teknik/Areas/Podcast/Views/Podcast/ViewPodcast.cshtml
  54. 1
      Teknik/Areas/Privacy/Views/Privacy/Index.cshtml
  55. 3
      Teknik/Areas/RSS/Controllers/RSSController.cs
  56. 1
      Teknik/Areas/Shortener/Controllers/ShortenerController.cs
  57. 2
      Teknik/Areas/Shortener/Shortener.cs
  58. 2
      Teknik/Areas/Shortener/ShortenerAreaRegistration.cs
  59. 2
      Teknik/Areas/Shortener/Views/Shortener/Index.cshtml
  60. 2
      Teknik/Areas/Stream/Views/Stream/Index.cshtml
  61. 1
      Teknik/Areas/TOS/Views/TOS/Index.cshtml
  62. 2
      Teknik/Areas/Transparency/TransparencyAreaRegistration.cs
  63. 3
      Teknik/Areas/Upload/Controllers/UploadController.cs
  64. 2
      Teknik/Areas/Upload/UploadAreaRegistration.cs
  65. 6
      Teknik/Areas/Upload/Uploader.cs
  66. 46
      Teknik/Areas/User/Controllers/UserController.cs
  67. 2
      Teknik/Areas/User/UserAreaRegistration.cs
  68. 4
      Teknik/Areas/User/Utility/UserHelper.cs
  69. 2
      Teknik/Areas/User/ViewModels/LoginViewModel.cs
  70. 2
      Teknik/Areas/User/ViewModels/RegisterViewModel.cs
  71. 3
      Teknik/Areas/User/Views/User/Index.cshtml
  72. 2
      Teknik/Areas/User/Views/User/Login.cshtml
  73. 2
      Teknik/Areas/User/Views/User/Register.cshtml
  74. 2
      Teknik/Areas/User/Views/User/ResetPassword.cshtml
  75. 2
      Teknik/Areas/User/Views/User/ResetPasswordVerification.cshtml
  76. 2
      Teknik/Areas/User/Views/User/Settings.cshtml
  77. 2
      Teknik/Areas/User/Views/User/TwoFactorCheck.cshtml
  78. 1
      Teknik/Areas/User/Views/User/_LoginPartial.cshtml
  79. 2
      Teknik/Areas/Vault/VaultAreaRegistration.cs
  80. 2
      Teknik/Areas/Vault/Views/Vault/ViewVault.cshtml
  81. 2
      Teknik/Attributes/TeknikAuthorizeAttribute.cs
  82. 144
      Teknik/Content/font-awesome.css
  83. 4
      Teknik/Content/font-awesome.min.css
  84. 8
      Teknik/Controllers/DefaultController.cs
  85. 3
      Teknik/Filters/TrackDownload.cs
  86. 3
      Teknik/Filters/TrackLink.cs
  87. 3
      Teknik/Filters/TrackPageView.cs
  88. 9
      Teknik/Global.asax.cs
  89. 4
      Teknik/Migrations/Configuration.cs
  90. 4
      Teknik/Scripts/jquery.validate-vsdoc.js
  91. 8
      Teknik/Scripts/jquery.validate.js
  92. 4
      Teknik/Scripts/jquery.validate.min.js
  93. 64
      Teknik/Teknik.csproj
  94. 2
      Teknik/ViewModels/ViewModelBase.cs
  95. 2
      Teknik/Views/Shared/_Layout.cshtml
  96. 2
      Teknik/Views/Shared/_Navbar.cshtml
  97. BIN
      Teknik/fonts/FontAwesome.otf
  98. BIN
      Teknik/fonts/fontawesome-webfont.eot
  99. 3350
      Teknik/fonts/fontawesome-webfont.svg
  100. BIN
      Teknik/fonts/fontawesome-webfont.ttf
  101. Some files were not shown because too many files have changed in this diff Show More

9
ServerMaint/Program.cs

@ -13,8 +13,9 @@ using Teknik.Areas.Upload.Models; @@ -13,8 +13,9 @@ using Teknik.Areas.Upload.Models;
using Teknik.Areas.Users.Models;
using Teknik.Areas.Users.Utility;
using Teknik.Configuration;
using Teknik.Helpers;
using Teknik.Utilities;
using Teknik.Models;
using Teknik.Utilities;
namespace ServerMaint
{
@ -149,7 +150,7 @@ namespace ServerMaint @@ -149,7 +150,7 @@ namespace ServerMaint
}
// We have the data, let's scan it
ClamScanResult scanResult = clam.SendAndScanFile(data);
ClamScanResult scanResult = clam.SendAndScanFileAsync(data).Result;
switch (scanResult.Result)
{
@ -552,7 +553,7 @@ Thank you for your continued use of Teknik! @@ -552,7 +553,7 @@ Thank you for your continued use of Teknik!
{
string email = UserHelper.GetUserEmailAddress(config, user.Username);
// We need to check the actual git database
MysqlDatabase mySQL = new MysqlDatabase(config.GitConfig.Database);
MysqlDatabase mySQL = new MysqlDatabase(config.GitConfig.Database.Server, config.GitConfig.Database.Database, config.GitConfig.Database.Username, config.GitConfig.Database.Password, config.GitConfig.Database.Port);
string sql = @"SELECT * FROM gogs.repository
LEFT JOIN gogs.action ON gogs.user.id = gogs.action.act_user_id
WHERE gogs.user.login_name = {0}";
@ -610,7 +611,7 @@ Thank you for your continued use of Teknik! @@ -610,7 +611,7 @@ Thank you for your continued use of Teknik!
List<User> curUsers = db.Users.ToList();
// We need to check the actual git database
MysqlDatabase mySQL = new MysqlDatabase(config.GitConfig.Database);
MysqlDatabase mySQL = new MysqlDatabase(config.GitConfig.Database.Server, config.GitConfig.Database.Database, config.GitConfig.Database.Username, config.GitConfig.Database.Password, config.GitConfig.Database.Port);
string sql = @"SELECT gogs.user.login_name AS login_name, gogs.user.lower_name AS username FROM gogs.user";
var results = mySQL.Query(sql);

16
ServerMaint/ServerMaint.csproj

@ -76,8 +76,8 @@ @@ -76,8 +76,8 @@
<HintPath>..\packages\Microsoft.AspNet.Identity.EntityFramework.2.2.1\lib\net45\Microsoft.AspNet.Identity.EntityFramework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="nClam, Version=2.0.6.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\nClam.2.0.6.0\lib\net40-Client\nClam.dll</HintPath>
<Reference Include="nClam, Version=3.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\nClam.3.0.0\lib\net45\nClam.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
@ -107,6 +107,14 @@ @@ -107,6 +107,14 @@
<Project>{b20317cd-76c6-4a7b-bce1-e4bef8e4f964}</Project>
<Name>Teknik</Name>
</ProjectReference>
<ProjectReference Include="..\Utilities\Configuration\Configuration.csproj">
<Project>{f0da1b67-af92-4b4a-8669-7e81645ff996}</Project>
<Name>Configuration</Name>
</ProjectReference>
<ProjectReference Include="..\Utilities\Utilities\Utilities.csproj">
<Project>{F45DE6FC-3754-4954-A20A-4277362CC6C1}</Project>
<Name>Utilities</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
@ -136,12 +144,12 @@ @@ -136,12 +144,12 @@
</COMReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\GitVersionTask.3.6.4\build\dotnet\GitVersionTask.targets" Condition="Exists('..\packages\GitVersionTask.3.6.4\build\dotnet\GitVersionTask.targets')" />
<Import Project="..\packages\GitVersionTask.3.6.5\build\dotnet\GitVersionTask.targets" Condition="Exists('..\packages\GitVersionTask.3.6.5\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.6.4\build\dotnet\GitVersionTask.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\GitVersionTask.3.6.4\build\dotnet\GitVersionTask.targets'))" />
<Error Condition="!Exists('..\packages\GitVersionTask.3.6.5\build\dotnet\GitVersionTask.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\GitVersionTask.3.6.5\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.

4
ServerMaint/packages.config

@ -3,10 +3,10 @@ @@ -3,10 +3,10 @@
<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.6.4" targetFramework="net452" developmentDependency="true" />
<package id="GitVersionTask" version="3.6.5" targetFramework="net462" developmentDependency="true" />
<package id="Inferno" version="1.4.0" 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" />
<package id="nClam" version="3.0.0" targetFramework="net462" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net452" />
</packages>

20
Teknik.sln

@ -20,6 +20,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Utilities", "Utilities\Util @@ -20,6 +20,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Utilities", "Utilities\Util
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Logging", "Utilities\Logging\Logging.csproj", "{77E865FD-F08B-4F07-9676-BC2FDCC7244C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Piwik", "Utilities\Piwik\Piwik.csproj", "{C492C2C6-D45A-498B-84A2-6D4C8BF9DE77}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Configuration", "Utilities\Configuration\Configuration.csproj", "{F0DA1B67-AF92-4B4A-8669-7E81645FF996}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -61,6 +65,22 @@ Global @@ -61,6 +65,22 @@ Global
{77E865FD-F08B-4F07-9676-BC2FDCC7244C}.Release|Any CPU.Build.0 = Release|Any CPU
{77E865FD-F08B-4F07-9676-BC2FDCC7244C}.Release|x64.ActiveCfg = Release|Any CPU
{77E865FD-F08B-4F07-9676-BC2FDCC7244C}.Release|x64.Build.0 = Release|Any CPU
{C492C2C6-D45A-498B-84A2-6D4C8BF9DE77}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C492C2C6-D45A-498B-84A2-6D4C8BF9DE77}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C492C2C6-D45A-498B-84A2-6D4C8BF9DE77}.Debug|x64.ActiveCfg = Debug|Any CPU
{C492C2C6-D45A-498B-84A2-6D4C8BF9DE77}.Debug|x64.Build.0 = Debug|Any CPU
{C492C2C6-D45A-498B-84A2-6D4C8BF9DE77}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C492C2C6-D45A-498B-84A2-6D4C8BF9DE77}.Release|Any CPU.Build.0 = Release|Any CPU
{C492C2C6-D45A-498B-84A2-6D4C8BF9DE77}.Release|x64.ActiveCfg = Release|Any CPU
{C492C2C6-D45A-498B-84A2-6D4C8BF9DE77}.Release|x64.Build.0 = Release|Any CPU
{F0DA1B67-AF92-4B4A-8669-7E81645FF996}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F0DA1B67-AF92-4B4A-8669-7E81645FF996}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F0DA1B67-AF92-4B4A-8669-7E81645FF996}.Debug|x64.ActiveCfg = Debug|Any CPU
{F0DA1B67-AF92-4B4A-8669-7E81645FF996}.Debug|x64.Build.0 = Debug|Any CPU
{F0DA1B67-AF92-4B4A-8669-7E81645FF996}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F0DA1B67-AF92-4B4A-8669-7E81645FF996}.Release|Any CPU.Build.0 = Release|Any CPU
{F0DA1B67-AF92-4B4A-8669-7E81645FF996}.Release|x64.ActiveCfg = Release|Any CPU
{F0DA1B67-AF92-4B4A-8669-7E81645FF996}.Release|x64.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

2
Teknik/App_Start/BundleConfig.cs

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
using System.Web;
using System.Web.Optimization;
using Teknik.Configuration;
using Teknik.Helpers;
using Teknik.Utilities;
namespace Teknik
{

2
Teknik/App_Start/SubdomainRoute.cs

@ -4,7 +4,7 @@ using System.Linq; @@ -4,7 +4,7 @@ using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
using Teknik.Helpers;
using Teknik.Utilities;
namespace Teknik
{

2
Teknik/Areas/API/Controllers/APIController.cs

@ -7,7 +7,7 @@ using System.Web; @@ -7,7 +7,7 @@ using System.Web;
using System.Web.Mvc;
using Teknik.Areas.Upload;
using Teknik.Controllers;
using Teknik.Helpers;
using Teknik.Utilities;
using Teknik.Models;
namespace Teknik.Areas.API.Controllers

2
Teknik/Areas/API/Controllers/APIv1Controller.cs

@ -8,7 +8,7 @@ using System.Web.Mvc; @@ -8,7 +8,7 @@ using System.Web.Mvc;
using Teknik.Areas.Upload;
using Teknik.Areas.Paste;
using Teknik.Controllers;
using Teknik.Helpers;
using Teknik.Utilities;
using Teknik.Models;
using System.Text;
using Teknik.Areas.Shortener.Models;

2
Teknik/Areas/About/Views/About/Index.cshtml

@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
@model Teknik.Areas.About.ViewModels.AboutViewModel
@using Teknik.Utilities
<div class="container">
<div class="row">
<div class="col-ms-12">

2
Teknik/Areas/Admin/AdminAreaRegistration.cs

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
using System.Web.Mvc;
using System.Web.Optimization;
using Teknik.Configuration;
using Teknik.Helpers;
using Teknik.Utilities;
namespace Teknik.Areas.Admin
{

2
Teknik/Areas/Admin/Views/Admin/Dashboard.cshtml

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
@model Teknik.Areas.Admin.ViewModels.DashboardViewModel
@using Teknik.Helpers
@using Teknik.Utilities
<div class="container">
<div class="row">

2
Teknik/Areas/Admin/Views/Admin/Search.cshtml

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
@model Teknik.Areas.Admin.ViewModels.SearchViewModel
@using Teknik.Helpers
@using Teknik.Utilities
<script>
// We need to define the action URLs for the script

2
Teknik/Areas/Admin/Views/Admin/SearchResult.cshtml

@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
@model Teknik.Areas.Admin.ViewModels.SearchResultViewModel
@using Teknik.Utilities
<div class="row">
<div class="row">
<div class="col-sm-3">

2
Teknik/Areas/Admin/Views/Admin/UserInfo.cshtml

@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
@model Teknik.Areas.Admin.ViewModels.UserInfoViewModel
@using Teknik.Utilities
<div class="row">
<div class="col-sm-10 col-sm-offset-1">
<a href="@Url.SubRouteUrl("user", "User.Index", new { username = Model.Username })">@Model.Username</a>

2
Teknik/Areas/Blog/BlogAreaRegistration.cs

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
using System.Web.Mvc;
using System.Web.Optimization;
using Teknik.Configuration;
using Teknik.Helpers;
using Teknik.Utilities;
namespace Teknik.Areas.Blog
{

3
Teknik/Areas/Blog/Controllers/BlogController.cs

@ -12,8 +12,9 @@ using Teknik.Areas.Users.Models; @@ -12,8 +12,9 @@ using Teknik.Areas.Users.Models;
using Teknik.Areas.Users.Utility;
using Teknik.Controllers;
using Teknik.Filters;
using Teknik.Helpers;
using Teknik.Utilities;
using Teknik.Models;
using Teknik.Utilities;
namespace Teknik.Areas.Blog.Controllers
{

2
Teknik/Areas/Blog/Views/Blog/Blog.cshtml

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
@model Teknik.Areas.Blog.ViewModels.BlogViewModel
@using Teknik.Helpers
@using Teknik.Utilities
<script>
// We need to define the action URLs for the script

2
Teknik/Areas/Blog/Views/Blog/Comment.cshtml

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
@model Teknik.Areas.Blog.ViewModels.CommentViewModel
@using Teknik.Helpers
@using Teknik.Utilities
<hr>
<div class="row">

2
Teknik/Areas/Blog/Views/Blog/EditPost.cshtml

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
@model Teknik.Areas.Blog.ViewModels.PostViewModel
@using Teknik.Helpers
@using Teknik.Utilities
<script>
// We need to define the action URLs for the script

2
Teknik/Areas/Blog/Views/Blog/NewPost.cshtml

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
@model Teknik.Areas.Blog.ViewModels.BlogViewModel
@using Teknik.Helpers
@using Teknik.Utilities
<script>
// We need to define the action URLs for the script

2
Teknik/Areas/Blog/Views/Blog/Post.cshtml

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
@model Teknik.Areas.Blog.ViewModels.PostViewModel
@using Teknik.Helpers
@using Teknik.Utilities
<div class="row">
<div class="col-sm-10 col-sm-offset-1">

2
Teknik/Areas/Blog/Views/Blog/ViewPost.cshtml

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
@model Teknik.Areas.Blog.ViewModels.PostViewModel
@using Teknik.Helpers
@using Teknik.Utilities
<script>
// We need to define the action URLs for the script

2
Teknik/Areas/Contact/ContactAreaRegistration.cs

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
using System.Web.Mvc;
using System.Web.Optimization;
using Teknik.Configuration;
using Teknik.Helpers;
using Teknik.Utilities;
namespace Teknik.Areas.Contact
{

2
Teknik/Areas/Contact/Views/Contact/Index.cshtml

@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
@model Teknik.Areas.Contact.ViewModels.ContactViewModel
@using Teknik.Utilities
@Scripts.Render("~/bundles/contact")
<div class="container">
<div class="row">

1
Teknik/Areas/Dev/Controllers/DevController.cs

@ -5,6 +5,7 @@ using System.Web; @@ -5,6 +5,7 @@ using System.Web;
using System.Web.Mvc;
using Teknik.Controllers;
using Teknik.Filters;
using Teknik.Utilities;
namespace Teknik.Areas.Dev.Controllers
{

2
Teknik/Areas/Error/Controllers/ErrorController.cs

@ -8,7 +8,7 @@ using System.Web.Mvc; @@ -8,7 +8,7 @@ using System.Web.Mvc;
using Teknik.Areas.Error.ViewModels;
using Teknik.Controllers;
using Teknik.Filters;
using Teknik.Helpers;
using Teknik.Utilities;
namespace Teknik.Areas.Error.Controllers
{

2
Teknik/Areas/Error/Views/Error/Exception.cshtml

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
@model Teknik.Areas.Error.ViewModels.ErrorViewModel
@using Teknik.Helpers
@using Teknik.Utilities
<div class="container">
<div class="row">

2
Teknik/Areas/Error/Views/Error/General.cshtml

@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
@model Teknik.Areas.Error.ViewModels.ErrorViewModel
@using Teknik.Utilities
<div class="container">
<div class="row">
<div class="col-md-12">

2
Teknik/Areas/Error/Views/Error/Http403.cshtml

@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
@model Teknik.Areas.Error.ViewModels.ErrorViewModel
@using Teknik.Utilities
<div class="container">
<div class="row">
<div class="col-md-12">

2
Teknik/Areas/Error/Views/Error/Http404.cshtml

@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
@model Teknik.Areas.Error.ViewModels.ErrorViewModel
@using Teknik.Utilities
<div class="container">
<div class="row">
<div class="col-md-12">

2
Teknik/Areas/Error/Views/Error/Http500.cshtml

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
@model Teknik.Areas.Error.ViewModels.ErrorViewModel
@using Teknik.Helpers
@using Teknik.Utilities
<div class="container">
<div class="row">

2
Teknik/Areas/Help/HelpAreaRegistration.cs

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
using System.Web.Mvc;
using System.Web.Optimization;
using Teknik.Configuration;
using Teknik.Helpers;
using Teknik.Utilities;
namespace Teknik.Areas.Help
{

2
Teknik/Areas/Help/Views/Help/API/API.cshtml

@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
@model Teknik.Areas.Help.ViewModels.HelpViewModel
@using Teknik.Utilities
@Styles.Render("~/Content/help");
<div class="container">

2
Teknik/Areas/Help/Views/Help/API/v1/Paste.cshtml

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
@model Teknik.Areas.Help.ViewModels.HelpViewModel
@using Teknik.Helpers
@using Teknik.Utilities
@using Teknik.Pygments
@Styles.Render("~/Content/help");

2
Teknik/Areas/Help/Views/Help/API/v1/Shorten.cshtml

@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
@model Teknik.Areas.Help.ViewModels.HelpViewModel
@using Teknik.Utilities
@Styles.Render("~/Content/help");
<div class="container">

2
Teknik/Areas/Help/Views/Help/API/v1/Upload.cshtml

@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
@model Teknik.Areas.Help.ViewModels.HelpViewModel
@using Teknik.Utilities
@Styles.Render("~/Content/help");
<div class="container">

2
Teknik/Areas/Help/Views/Help/Index.cshtml

@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
@model Teknik.Areas.Help.ViewModels.HelpViewModel
@using Teknik.Utilities
<div class="container">
<div class="row">
<div class="col-sm-10 col-sm-offset-1">

2
Teknik/Areas/Help/Views/Help/Mail.cshtml

@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
@model Teknik.Areas.Help.ViewModels.HelpViewModel
@using Teknik.Utilities
<div class="container">
<div class="row">
<h2><b>Mail</b></h2>

2
Teknik/Areas/Home/Controllers/HomeController.cs

@ -7,7 +7,7 @@ using Teknik.Areas.Podcast.Models; @@ -7,7 +7,7 @@ using Teknik.Areas.Podcast.Models;
using Teknik.Areas.Blog.Models;
using Teknik.Areas.Home.ViewModels;
using Teknik.Controllers;
using Teknik.Helpers;
using Teknik.Utilities;
using Teknik.Models;
using Teknik.Filters;

3
Teknik/Areas/Home/HomeAreaRegistration.cs

@ -1,10 +1,9 @@ @@ -1,10 +1,9 @@
using System.Collections.Generic;
using System.Web.Mvc;
using System.Web.Optimization;
using Teknik;
using Teknik.Configuration;
using Teknik.Controllers;
using Teknik.Helpers;
using Teknik.Utilities;
namespace Teknik.Areas.Home
{

2
Teknik/Areas/Home/Views/Home/Index.cshtml

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
@using Teknik.Areas.Blog.Models
@using Teknik.Areas.Podcast.Models
@using Teknik.Helpers
@using Teknik.Utilities
@{
string logoPath = "/Images/logo-blue.svg";

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

@ -12,7 +12,7 @@ using Teknik.Areas.Paste.ViewModels; @@ -12,7 +12,7 @@ using Teknik.Areas.Paste.ViewModels;
using Teknik.Areas.Users.Utility;
using Teknik.Controllers;
using Teknik.Filters;
using Teknik.Helpers;
using Teknik.Utilities;
using Teknik.Models;
using Teknik.Utilities;
@ -69,7 +69,7 @@ namespace Teknik.Areas.Paste.Controllers @@ -69,7 +69,7 @@ namespace Teknik.Areas.Paste.Controllers
string hash = string.Empty;
if (!string.IsNullOrEmpty(password))
{
byte[] passBytes = Helpers.SHA384.Hash(paste.Key, password);
byte[] passBytes = Utilities.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))

2
Teknik/Areas/Paste/PasteAreaRegistration.cs

@ -3,7 +3,7 @@ using System.Web.Mvc; @@ -3,7 +3,7 @@ using System.Web.Mvc;
using System.Web.Optimization;
using Teknik.Configuration;
using Teknik.Controllers;
using Teknik.Helpers;
using Teknik.Utilities;
namespace Teknik.Areas.Paste
{

2
Teknik/Areas/Paste/PasteHelper.cs

@ -4,7 +4,7 @@ using System.Linq; @@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Web;
using Teknik.Configuration;
using Teknik.Helpers;
using Teknik.Utilities;
using Teknik.Models;
using Teknik.Utilities;

2
Teknik/Areas/Paste/Views/Paste/Full.cshtml

@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
@model Teknik.Areas.Paste.ViewModels.PasteViewModel
@using Teknik.Utilities
@Styles.Render("~/Content/paste")
@Scripts.Render("~/bundles/paste")

2
Teknik/Areas/Paste/Views/Paste/Index.cshtml

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
@model Teknik.Areas.Paste.ViewModels.PasteCreateViewModel
@using Teknik.Helpers
@using Teknik.Utilities
@using Teknik.Pygments
@Styles.Render("~/Content/paste")

2
Teknik/Areas/Paste/Views/Paste/PasswordNeeded.cshtml

@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
@model Teknik.Areas.Paste.ViewModels.PasswordViewModel
@using Teknik.Utilities
<div class="container">
<div class="row text-center">
<div class="col-sm-6 col-sm-offset-3">

1
Teknik/Areas/Podcast/Controllers/PodcastController.cs

@ -11,6 +11,7 @@ using Teknik.Areas.Users.Utility; @@ -11,6 +11,7 @@ using Teknik.Areas.Users.Utility;
using Teknik.Controllers;
using Teknik.Filters;
using Teknik.Models;
using Teknik.Utilities;
namespace Teknik.Areas.Podcast.Controllers
{

2
Teknik/Areas/Podcast/PodcastAreaRegistration.cs

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
using System.Web.Mvc;
using System.Web.Optimization;
using Teknik.Configuration;
using Teknik.Helpers;
using Teknik.Utilities;
namespace Teknik.Areas.Podcast
{

2
Teknik/Areas/Podcast/Views/Podcast/Comment.cshtml

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
@model Teknik.Areas.Blog.ViewModels.CommentViewModel
@using Teknik.Helpers
@using Teknik.Utilities
<hr>
<div class="row">

2
Teknik/Areas/Podcast/Views/Podcast/Main.cshtml

@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
@model Teknik.Areas.Podcast.ViewModels.MainViewModel
@using Teknik.Utilities
<script>
// We need to define the action URLs for the script

2
Teknik/Areas/Podcast/Views/Podcast/Podcast.cshtml

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
@model Teknik.Areas.Podcast.ViewModels.PodcastViewModel
@using Teknik.Areas.Podcast.Models
@using Teknik.Helpers
@using Teknik.Utilities
<div class="row">
<div class="col-sm-10 col-sm-offset-1">

2
Teknik/Areas/Podcast/Views/Podcast/ViewPodcast.cshtml

@ -1,4 +1,6 @@ @@ -1,4 +1,6 @@
@model Teknik.Areas.Podcast.ViewModels.PodcastViewModel
@using Teknik.Utilities
<script>
// We need to define the action URLs for the script

1
Teknik/Areas/Privacy/Views/Privacy/Index.cshtml

@ -1,6 +1,5 @@ @@ -1,6 +1,5 @@
@model Teknik.Areas.Privacy.ViewModels.PrivacyViewModel
@using Teknik.Models
<div class="container">
<div class="row">
<div class="col-xs-10">

3
Teknik/Areas/RSS/Controllers/RSSController.cs

@ -9,8 +9,9 @@ using System.Xml.Linq; @@ -9,8 +9,9 @@ using System.Xml.Linq;
using Teknik.Areas.Blog.Models;
using Teknik.Controllers;
using Teknik.Filters;
using Teknik.Helpers;
using Teknik.Utilities;
using Teknik.Models;
using Teknik.Utilities;
namespace Teknik.Areas.RSS.Controllers
{

1
Teknik/Areas/Shortener/Controllers/ShortenerController.cs

@ -9,6 +9,7 @@ using Teknik.Areas.Users.Utility; @@ -9,6 +9,7 @@ using Teknik.Areas.Users.Utility;
using Teknik.Controllers;
using Teknik.Filters;
using Teknik.Models;
using Teknik.Utilities;
namespace Teknik.Areas.Shortener.Controllers
{

2
Teknik/Areas/Shortener/Shortener.cs

@ -4,7 +4,7 @@ using System.Linq; @@ -4,7 +4,7 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Teknik.Areas.Shortener.Models;
using Teknik.Helpers;
using Teknik.Utilities;
using Teknik.Models;
using Teknik.Utilities;

2
Teknik/Areas/Shortener/ShortenerAreaRegistration.cs

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
using System.Web.Mvc;
using System.Web.Optimization;
using Teknik.Configuration;
using Teknik.Helpers;
using Teknik.Utilities;
namespace Teknik.Areas.Shortener
{

2
Teknik/Areas/Shortener/Views/Shortener/Index.cshtml

@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
@model Teknik.Areas.Shortener.ViewModels.ShortenViewModel
@using Teknik.Utilities
@Scripts.Render("~/bundles/shortener")
<div class="container">

2
Teknik/Areas/Stream/Views/Stream/Index.cshtml

@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
@model Teknik.Areas.Stream.ViewModels.StreamViewModel
@using Teknik.Utilities
<div class="container">
@if (Model.Config.StreamConfig.Enabled)
{

1
Teknik/Areas/TOS/Views/TOS/Index.cshtml

@ -1,6 +1,5 @@ @@ -1,6 +1,5 @@
@model Teknik.Areas.TOS.ViewModels.TOSViewModel
@using Teknik.Models
<div class="container">
<div class="row">
<div class="col-xs-10">

2
Teknik/Areas/Transparency/TransparencyAreaRegistration.cs

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
using System.Web.Mvc;
using System.Web.Optimization;
using Teknik.Configuration;
using Teknik.Helpers;
using Teknik.Utilities;
namespace Teknik.Areas.Transparency
{

3
Teknik/Areas/Upload/Controllers/UploadController.cs

@ -15,9 +15,8 @@ using Teknik.Areas.Upload.ViewModels; @@ -15,9 +15,8 @@ using Teknik.Areas.Upload.ViewModels;
using Teknik.Areas.Users.Utility;
using Teknik.Controllers;
using Teknik.Filters;
using Teknik.Helpers;
using Teknik.Models;
using Teknik.Utilities;
using Teknik.Models;
namespace Teknik.Areas.Upload.Controllers
{

2
Teknik/Areas/Upload/UploadAreaRegistration.cs

@ -3,7 +3,7 @@ using System.Web.Mvc; @@ -3,7 +3,7 @@ using System.Web.Mvc;
using System.Web.Optimization;
using Teknik.Configuration;
using Teknik.Controllers;
using Teknik.Helpers;
using Teknik.Utilities;
namespace Teknik.Areas.Upload
{

6
Teknik/Areas/Upload/Uploader.cs

@ -5,7 +5,7 @@ using System.Web; @@ -5,7 +5,7 @@ using System.Web;
using System.IO;
using Teknik.Configuration;
using Teknik.Models;
using Teknik.Helpers;
using Teknik.Utilities;
using Teknik.Utilities;
namespace Teknik.Areas.Upload
@ -39,14 +39,14 @@ namespace Teknik.Areas.Upload @@ -39,14 +39,14 @@ namespace Teknik.Areas.Upload
}
// Generate a unique file name that does not currently exist
string filePath = Utility.GenerateUniqueFileName(config.UploadConfig.UploadDirectory, config.UploadConfig.FileExtension, 10);
string filePath = FileHelper.GenerateUniqueFileName(config.UploadConfig.UploadDirectory, config.UploadConfig.FileExtension, 10);
string fileName = Path.GetFileName(filePath);
// once we have the filename, lets save the file
File.WriteAllBytes(filePath, file);
// Generate a unique url
string extension = (config.UploadConfig.IncludeExtension) ? Utility.GetDefaultExtension(contentType, defaultExtension) : string.Empty;
string extension = (config.UploadConfig.IncludeExtension) ? FileHelper.GetDefaultExtension(contentType, defaultExtension) : string.Empty;
string url = StringHelper.RandomString(config.UploadConfig.UrlLength) + extension;
while (db.Uploads.Where(u => u.Url == url).FirstOrDefault() != null)
{

46
Teknik/Areas/User/Controllers/UserController.cs

@ -2,26 +2,18 @@ @@ -2,26 +2,18 @@
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Runtime.InteropServices;
using System.Web;
using System.Web.Mvc;
using System.Web.Security;
using Teknik.Areas.Shortener.Models;
using Teknik.Areas.Blog.Models;
using Teknik.Areas.Error.Controllers;
using Teknik.Areas.Error.ViewModels;
using Teknik.Areas.Users.Models;
using Teknik.Areas.Users.ViewModels;
using Teknik.Controllers;
using Teknik.Helpers;
using Teknik.Utilities;
using Teknik.Models;
using Teknik.ViewModels;
using System.Windows;
using System.Net;
using Teknik.Areas.Users.Utility;
using Teknik.Filters;
using Teknik.Utilities;
using QRCoder;
using System.Text;
using TwoStepsAuthenticator;
using System.Drawing;
@ -596,6 +588,7 @@ namespace Teknik.Areas.Users.Controllers @@ -596,6 +588,7 @@ namespace Teknik.Areas.Users.Controllers
// The password reset code is valid, let's get their user account for this session
User user = UserHelper.GetUser(db, username);
Session["AuthenticatedUser"] = user;
Session["AuthCode"] = code;
}
ResetPasswordVerificationViewModel model = new ResetPasswordVerificationViewModel();
@ -613,24 +606,29 @@ namespace Teknik.Areas.Users.Controllers @@ -613,24 +606,29 @@ namespace Teknik.Areas.Users.Controllers
{
try
{
User user = (User)Session["AuthenticatedUser"];
if (user != null)
string code = Session["AuthCode"].ToString();
if (!string.IsNullOrEmpty(code))
{
if (string.IsNullOrEmpty(password))
{
return Json(new { error = "Password must not be empty" });
}
if (password != confirmPassword)
User user = (User)Session["AuthenticatedUser"];
if (user != null)
{
return Json(new { error = "Passwords must match" });
}
if (string.IsNullOrEmpty(password))
{
return Json(new { error = "Password must not be empty" });
}
if (password != confirmPassword)
{
return Json(new { error = "Passwords must match" });
}
User newUser = UserHelper.GetUser(db, user.Username);
UserHelper.EditAccount(db, Config, newUser, true, password);
User newUser = UserHelper.GetUser(db, user.Username);
UserHelper.EditAccount(db, Config, newUser, true, password);
return Json(new { result = true });
return Json(new { result = true });
}
return Json(new { error = "User does not exist" });
}
return Json(new { error = "User does not exist" });
return Json(new { error = "Invalid Code" });
}
catch (Exception ex)
{
@ -742,7 +740,7 @@ namespace Teknik.Areas.Users.Controllers @@ -742,7 +740,7 @@ namespace Teknik.Areas.Users.Controllers
QRCodeData qrCodeData = qrGenerator.CreateQrCode(ProvisionUrl, QRCodeGenerator.ECCLevel.Q);
QRCode qrCode = new QRCode(qrCodeData);
Bitmap qrCodeImage = qrCode.GetGraphic(20);
return File(Helpers.Utility.ImageToByte(qrCodeImage), "image/png");
return File(ByteHelper.ImageToByte(qrCodeImage), "image/png");
}
[HttpPost]

2
Teknik/Areas/User/UserAreaRegistration.cs

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
using System.Web.Mvc;
using System.Web.Optimization;
using Teknik.Configuration;
using Teknik.Helpers;
using Teknik.Utilities;
namespace Teknik.Areas.Users
{

4
Teknik/Areas/User/Utility/UserHelper.cs

@ -15,7 +15,7 @@ using Teknik.Areas.Blog.Models; @@ -15,7 +15,7 @@ using Teknik.Areas.Blog.Models;
using Teknik.Areas.Shortener.Models;
using Teknik.Areas.Users.Models;
using Teknik.Configuration;
using Teknik.Helpers;
using Teknik.Utilities;
using Teknik.Models;
using Teknik.Utilities;
@ -738,7 +738,7 @@ If you recieved this email and you did not reset your password, you can ignore t @@ -738,7 +738,7 @@ If you recieved this email and you did not reset your password, you can ignore t
{
string email = GetUserEmailAddress(config, username);
// We need to check the actual git database
MysqlDatabase mySQL = new MysqlDatabase(config.GitConfig.Database);
MysqlDatabase mySQL = new MysqlDatabase(config.GitConfig.Database.Server, config.GitConfig.Database.Database, config.GitConfig.Database.Username, config.GitConfig.Database.Password, config.GitConfig.Database.Port);
string sql = @"SELECT
CASE
WHEN MAX(gogs.action.created) >= MAX(gogs.user.updated) THEN MAX(gogs.action.created)

2
Teknik/Areas/User/ViewModels/LoginViewModel.cs

@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations; @@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
using System.Web.Security;
using Teknik.Helpers;
using Teknik.Utilities;
using Teknik.Models;
using Teknik.ViewModels;

2
Teknik/Areas/User/ViewModels/RegisterViewModel.cs

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
using System;
using System.ComponentModel.DataAnnotations;
using Teknik.Areas.Users.Models;
using Teknik.Helpers;
using Teknik.Utilities;
using Teknik.Models;
using Teknik.ViewModels;

3
Teknik/Areas/User/Views/User/Index.cshtml

@ -1,9 +1,6 @@ @@ -1,9 +1,6 @@
@model Teknik.Areas.Users.ViewModels.ProfileViewModel
@using Teknik.Helpers
@using Teknik.Utilities
@using Teknik.Areas.Paste
@using Teknik.Areas.Upload
<div class="container">
@if (!Model.Error)

2
Teknik/Areas/User/Views/User/Login.cshtml

@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
@model Teknik.Areas.Users.ViewModels.LoginViewModel
@using Teknik.Utilities
@if (Model.Config.UserConfig.LoginEnabled)
{
<div class="row">

2
Teknik/Areas/User/Views/User/Register.cshtml

@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
@model Teknik.Areas.Users.ViewModels.RegisterViewModel
@using Teknik.Utilities
@if (Model.Config.UserConfig.RegistrationEnabled)
{
<div class="row">

2
Teknik/Areas/User/Views/User/ResetPassword.cshtml

@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
@model Teknik.Areas.Users.ViewModels.ResetPasswordViewModel
@using Teknik.Utilities
@Scripts.Render("~/bundles/user")
<div class="container">

2
Teknik/Areas/User/Views/User/ResetPasswordVerification.cshtml

@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
@model Teknik.Areas.Users.ViewModels.ResetPasswordVerificationViewModel
@using Teknik.Utilities
@Scripts.Render("~/bundles/user")
<div class="container">

2
Teknik/Areas/User/Views/User/Settings.cshtml

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
@model Teknik.Areas.Users.ViewModels.SettingsViewModel
@using Teknik.Helpers
@using Teknik.Utilities
<script>
var homeUrl = '@Url.SubRouteUrl("www", "Home.Index")';

2
Teknik/Areas/User/Views/User/TwoFactorCheck.cshtml

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
@model Teknik.Areas.Users.ViewModels.TwoFactorViewModel
@using Teknik.Helpers
@using Teknik.Utilities
<script>
var confirmAuthCodeURL = '@Url.SubRouteUrl("user", "User.Action", new { action = "ConfirmAuthenticatorCode" })';

1
Teknik/Areas/User/Views/User/_LoginPartial.cshtml

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
@model Teknik.ViewModels.ViewModelBase
@using Teknik.Utilities
@using Microsoft.AspNet.Identity
@if (Model.Config.UserConfig.RegistrationEnabled || Model.Config.UserConfig.LoginEnabled)

2
Teknik/Areas/Vault/VaultAreaRegistration.cs

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
using System.Web.Mvc;
using System.Web.Optimization;
using Teknik.Configuration;
using Teknik.Helpers;
using Teknik.Utilities;
namespace Teknik.Areas.Vault
{

2
Teknik/Areas/Vault/Views/Vault/ViewVault.cshtml

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
@model Teknik.Areas.Vault.ViewModels.VaultViewModel
@using Teknik.Helpers
@using Teknik.Utilities
<div class="container">
<p>Coming Soon!</p>

2
Teknik/Attributes/TeknikAuthorizeAttribute.cs

@ -5,7 +5,7 @@ using System.Web; @@ -5,7 +5,7 @@ using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
using Teknik.Areas.Error.Controllers;
using Teknik.Helpers;
using Teknik.Utilities;
using Teknik.Areas.Users.Controllers;
namespace Teknik.Attributes

144
Teknik/Content/font-awesome.css vendored

@ -1,13 +1,13 @@ @@ -1,13 +1,13 @@
/*!
* Font Awesome 4.6.3 by @davegandy - http://fontawesome.io - @fontawesome
* Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome
* License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
*/
/* FONT PATH
* -------------------------- */
@font-face {
font-family: 'FontAwesome';
src: url('../fonts/fontawesome-webfont.eot?v=4.6.3');
src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.6.3') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff2?v=4.6.3') format('woff2'), url('../fonts/fontawesome-webfont.woff?v=4.6.3') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.6.3') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.6.3#fontawesomeregular') format('svg');
src: url('../fonts/fontawesome-webfont.eot?v=4.7.0');
src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'), url('../fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');
font-weight: normal;
font-style: normal;
}
@ -1832,6 +1832,7 @@ @@ -1832,6 +1832,7 @@
content: "\f23e";
}
.fa-battery-4:before,
.fa-battery:before,
.fa-battery-full:before {
content: "\f240";
}
@ -2178,6 +2179,143 @@ @@ -2178,6 +2179,143 @@
.fa-font-awesome:before {
content: "\f2b4";
}
.fa-handshake-o:before {
content: "\f2b5";
}
.fa-envelope-open:before {
content: "\f2b6";
}
.fa-envelope-open-o:before {
content: "\f2b7";
}
.fa-linode:before {
content: "\f2b8";
}
.fa-address-book:before {
content: "\f2b9";
}
.fa-address-book-o:before {
content: "\f2ba";
}
.fa-vcard:before,
.fa-address-card:before {
content: "\f2bb";
}
.fa-vcard-o:before,
.fa-address-card-o:before {
content: "\f2bc";
}
.fa-user-circle:before {
content: "\f2bd";
}
.fa-user-circle-o:before {
content: "\f2be";
}
.fa-user-o:before {
content: "\f2c0";
}
.fa-id-badge:before {
content: "\f2c1";
}
.fa-drivers-license:before,
.fa-id-card:before {
content: "\f2c2";
}
.fa-drivers-license-o:before,
.fa-id-card-o:before {
content: "\f2c3";
}
.fa-quora:before {
content: "\f2c4";
}
.fa-free-code-camp:before {
content: "\f2c5";
}
.fa-telegram:before {
content: "\f2c6";
}
.fa-thermometer-4:before,
.fa-thermometer:before,
.fa-thermometer-full:before {
content: "\f2c7";
}
.fa-thermometer-3:before,
.fa-thermometer-three-quarters:before {
content: "\f2c8";
}
.fa-thermometer-2:before,
.fa-thermometer-half:before {
content: "\f2c9";
}
.fa-thermometer-1:before,
.fa-thermometer-quarter:before {
content: "\f2ca";
}
.fa-thermometer-0:before,
.fa-thermometer-empty:before {
content: "\f2cb";
}
.fa-shower:before {
content: "\f2cc";
}
.fa-bathtub:before,
.fa-s15:before,
.fa-bath:before {
content: "\f2cd";
}
.fa-podcast:before {
content: "\f2ce";
}
.fa-window-maximize:before {
content: "\f2d0";
}
.fa-window-minimize:before {
content: "\f2d1";
}
.fa-window-restore:before {
content: "\f2d2";
}
.fa-times-rectangle:before,
.fa-window-close:before {
content: "\f2d3";
}
.fa-times-rectangle-o:before,
.fa-window-close-o:before {
content: "\f2d4";
}
.fa-bandcamp:before {
content: "\f2d5";
}
.fa-grav:before {
content: "\f2d6";
}
.fa-etsy:before {
content: "\f2d7";
}
.fa-imdb:before {