@@ -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 | |||
} | |||
// 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! | |||
{ | |||
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! | |||
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); | |||
@@ -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 @@ | |||
<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 @@ | |||
</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. |
@@ -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,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 | |||
{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 |
@@ -1,7 +1,7 @@ | |||
using System.Web; | |||
using System.Web.Optimization; | |||
using Teknik.Configuration; | |||
using Teknik.Helpers; | |||
using Teknik.Utilities; | |||
namespace Teknik | |||
{ |
@@ -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 | |||
{ |
@@ -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 |
@@ -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; |
@@ -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,7 +2,7 @@ | |||
using System.Web.Mvc; | |||
using System.Web.Optimization; | |||
using Teknik.Configuration; | |||
using Teknik.Helpers; | |||
using Teknik.Utilities; | |||
namespace Teknik.Areas.Admin | |||
{ |
@@ -1,6 +1,6 @@ | |||
@model Teknik.Areas.Admin.ViewModels.DashboardViewModel | |||
@using Teknik.Helpers | |||
@using Teknik.Utilities | |||
<div class="container"> | |||
<div class="row"> |
@@ -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 |
@@ -1,5 +1,7 @@ | |||
@model Teknik.Areas.Admin.ViewModels.SearchResultViewModel | |||
@using Teknik.Utilities | |||
<div class="row"> | |||
<div class="row"> | |||
<div class="col-sm-3"> |
@@ -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,7 +2,7 @@ | |||
using System.Web.Mvc; | |||
using System.Web.Optimization; | |||
using Teknik.Configuration; | |||
using Teknik.Helpers; | |||
using Teknik.Utilities; | |||
namespace Teknik.Areas.Blog | |||
{ |
@@ -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 | |||
{ |
@@ -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 |
@@ -1,6 +1,6 @@ | |||
@model Teknik.Areas.Blog.ViewModels.CommentViewModel | |||
@using Teknik.Helpers | |||
@using Teknik.Utilities | |||
<hr> | |||
<div class="row"> |
@@ -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 |
@@ -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 |
@@ -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"> |
@@ -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,7 +2,7 @@ | |||
using System.Web.Mvc; | |||
using System.Web.Optimization; | |||
using Teknik.Configuration; | |||
using Teknik.Helpers; | |||
using Teknik.Utilities; | |||
namespace Teknik.Areas.Contact | |||
{ |
@@ -1,5 +1,7 @@ | |||
@model Teknik.Areas.Contact.ViewModels.ContactViewModel | |||
@using Teknik.Utilities | |||
@Scripts.Render("~/bundles/contact") | |||
<div class="container"> | |||
<div class="row"> |
@@ -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 | |||
{ |
@@ -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 | |||
{ |
@@ -1,6 +1,6 @@ | |||
@model Teknik.Areas.Error.ViewModels.ErrorViewModel | |||
@using Teknik.Helpers | |||
@using Teknik.Utilities | |||
<div class="container"> | |||
<div class="row"> |
@@ -1,5 +1,7 @@ | |||
@model Teknik.Areas.Error.ViewModels.ErrorViewModel | |||
@using Teknik.Utilities | |||
<div class="container"> | |||
<div class="row"> | |||
<div class="col-md-12"> |
@@ -1,5 +1,7 @@ | |||
@model Teknik.Areas.Error.ViewModels.ErrorViewModel | |||
@using Teknik.Utilities | |||
<div class="container"> | |||
<div class="row"> | |||
<div class="col-md-12"> |
@@ -1,5 +1,7 @@ | |||
@model Teknik.Areas.Error.ViewModels.ErrorViewModel | |||
@using Teknik.Utilities | |||
<div class="container"> | |||
<div class="row"> | |||
<div class="col-md-12"> |
@@ -1,6 +1,6 @@ | |||
@model Teknik.Areas.Error.ViewModels.ErrorViewModel | |||
@using Teknik.Helpers | |||
@using Teknik.Utilities | |||
<div class="container"> | |||
<div class="row"> |
@@ -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 | |||
{ |
@@ -1,5 +1,7 @@ | |||
@model Teknik.Areas.Help.ViewModels.HelpViewModel | |||
@using Teknik.Utilities | |||
@Styles.Render("~/Content/help"); | |||
<div class="container"> |
@@ -1,6 +1,6 @@ | |||
@model Teknik.Areas.Help.ViewModels.HelpViewModel | |||
@using Teknik.Helpers | |||
@using Teknik.Utilities | |||
@using Teknik.Pygments | |||
@Styles.Render("~/Content/help"); |
@@ -1,5 +1,7 @@ | |||
@model Teknik.Areas.Help.ViewModels.HelpViewModel | |||
@using Teknik.Utilities | |||
@Styles.Render("~/Content/help"); | |||
<div class="container"> |
@@ -1,5 +1,7 @@ | |||
@model Teknik.Areas.Help.ViewModels.HelpViewModel | |||
@using Teknik.Utilities | |||
@Styles.Render("~/Content/help"); | |||
<div class="container"> |
@@ -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"> |
@@ -1,5 +1,7 @@ | |||
@model Teknik.Areas.Help.ViewModels.HelpViewModel | |||
@using Teknik.Utilities | |||
<div class="container"> | |||
<div class="row"> | |||
<h2><b>Mail</b></h2> |
@@ -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; | |||
@@ -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,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"; |
@@ -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 | |||
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)) |
@@ -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 | |||
{ |
@@ -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; | |||
@@ -1,5 +1,7 @@ | |||
@model Teknik.Areas.Paste.ViewModels.PasteViewModel | |||
@using Teknik.Utilities | |||
@Styles.Render("~/Content/paste") | |||
@Scripts.Render("~/bundles/paste") | |||
@@ -1,6 +1,6 @@ | |||
@model Teknik.Areas.Paste.ViewModels.PasteCreateViewModel | |||
@using Teknik.Helpers | |||
@using Teknik.Utilities | |||
@using Teknik.Pygments | |||
@Styles.Render("~/Content/paste") |
@@ -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"> |
@@ -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,7 +2,7 @@ | |||
using System.Web.Mvc; | |||
using System.Web.Optimization; | |||
using Teknik.Configuration; | |||
using Teknik.Helpers; | |||
using Teknik.Utilities; | |||
namespace Teknik.Areas.Podcast | |||
{ |
@@ -1,6 +1,6 @@ | |||
@model Teknik.Areas.Blog.ViewModels.CommentViewModel | |||
@using Teknik.Helpers | |||
@using Teknik.Utilities | |||
<hr> | |||
<div class="row"> |
@@ -1,5 +1,7 @@ | |||
@model Teknik.Areas.Podcast.ViewModels.MainViewModel | |||
@using Teknik.Utilities | |||
<script> | |||
// We need to define the action URLs for the script | |||
@@ -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"> |
@@ -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,6 +1,5 @@ | |||
@model Teknik.Areas.Privacy.ViewModels.PrivacyViewModel | |||
@using Teknik.Models | |||
<div class="container"> | |||
<div class="row"> | |||
<div class="col-xs-10"> |
@@ -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 | |||
{ |
@@ -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 | |||
{ |
@@ -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,7 +2,7 @@ | |||
using System.Web.Mvc; | |||
using System.Web.Optimization; | |||
using Teknik.Configuration; | |||
using Teknik.Helpers; | |||
using Teknik.Utilities; | |||
namespace Teknik.Areas.Shortener | |||
{ |
@@ -1,5 +1,7 @@ | |||
@model Teknik.Areas.Shortener.ViewModels.ShortenViewModel | |||
@using Teknik.Utilities | |||
@Scripts.Render("~/bundles/shortener") | |||
<div class="container"> |
@@ -1,5 +1,7 @@ | |||
@model Teknik.Areas.Stream.ViewModels.StreamViewModel | |||
@using Teknik.Utilities | |||
<div class="container"> | |||
@if (Model.Config.StreamConfig.Enabled) | |||
{ |
@@ -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,7 +2,7 @@ | |||
using System.Web.Mvc; | |||
using System.Web.Optimization; | |||
using Teknik.Configuration; | |||
using Teknik.Helpers; | |||
using Teknik.Utilities; | |||
namespace Teknik.Areas.Transparency | |||
{ |
@@ -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 | |||
{ |
@@ -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 | |||
{ |
@@ -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 | |||
} | |||
// 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) | |||
{ |
@@ -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 | |||
// 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 | |||
{ | |||
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 | |||
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,7 +2,7 @@ | |||
using System.Web.Mvc; | |||
using System.Web.Optimization; | |||
using Teknik.Configuration; | |||
using Teknik.Helpers; | |||
using Teknik.Utilities; | |||
namespace Teknik.Areas.Users | |||
{ |
@@ -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 | |||
{ | |||
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) |
@@ -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; | |||
@@ -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; | |||
@@ -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) |
@@ -1,5 +1,7 @@ | |||
@model Teknik.Areas.Users.ViewModels.LoginViewModel | |||
@using Teknik.Utilities | |||
@if (Model.Config.UserConfig.LoginEnabled) | |||
{ | |||
<div class="row"> |
@@ -1,5 +1,7 @@ | |||
@model Teknik.Areas.Users.ViewModels.RegisterViewModel | |||
@using Teknik.Utilities | |||
@if (Model.Config.UserConfig.RegistrationEnabled) | |||
{ | |||
<div class="row"> |
@@ -1,5 +1,7 @@ | |||
@model Teknik.Areas.Users.ViewModels.ResetPasswordViewModel | |||
@using Teknik.Utilities | |||
@Scripts.Render("~/bundles/user") | |||
<div class="container"> |
@@ -1,5 +1,7 @@ | |||
@model Teknik.Areas.Users.ViewModels.ResetPasswordVerificationViewModel | |||
@using Teknik.Utilities | |||
@Scripts.Render("~/bundles/user") | |||
<div class="container"> |
@@ -1,6 +1,6 @@ | |||
@model Teknik.Areas.Users.ViewModels.SettingsViewModel | |||
@using Teknik.Helpers | |||
@using Teknik.Utilities | |||
<script> | |||
var homeUrl = '@Url.SubRouteUrl("www", "Home.Index")'; |
@@ -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,5 +1,6 @@ | |||
@model Teknik.ViewModels.ViewModelBase | |||
@using Teknik.Utilities | |||
@using Microsoft.AspNet.Identity | |||
@if (Model.Config.UserConfig.RegistrationEnabled || Model.Config.UserConfig.LoginEnabled) |
@@ -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 | |||
{ |
@@ -1,6 +1,6 @@ | |||
@model Teknik.Areas.Vault.ViewModels.VaultViewModel | |||
@using Teknik.Helpers | |||
@using Teknik.Utilities | |||
<div class="container"> | |||
<p>Coming Soon!</p> |
@@ -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 |
@@ -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 @@ | |||
content: "\f23e"; | |||
} | |||
.fa-battery-4:before, | |||
.fa-battery:before, | |||
.fa-battery-full:before { | |||
content: "\f240"; | |||
} | |||
@@ -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 { | |||
content: "\f2d8"; | |||
} | |||
.fa-ravelry:before { | |||
content: "\f2d9"; | |||
} | |||
.fa-eercast:before { | |||
content: "\f2da"; | |||
} | |||
.fa-microchip:before { | |||
content: "\f2db"; | |||
} | |||
.fa-snowflake-o:before { | |||
content: "\f2dc"; | |||
} | |||
.fa-superpowers:before { | |||
content: "\f2dd"; | |||
} | |||
.fa-wpexplorer:before { | |||
content: "\f2de"; | |||
} | |||
.fa-meetup:before { | |||
content: "\f2e0"; | |||
} | |||
.sr-only { | |||
position: absolute; | |||
width: 1px; |
@@ -1,17 +1,11 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Web; | |||
using System.Web.Mvc; | |||
using System.Web.Routing; | |||
using Teknik.Areas.Error.Controllers; | |||
using Teknik.Areas.Error.ViewModels; | |||
using Teknik.Configuration; | |||
using Piwik.Tracker; | |||
using Teknik.Filters; | |||
using Teknik.Helpers; | |||
using Teknik.ViewModels; | |||
using Teknik.Utilities; | |||
namespace Teknik.Controllers | |||
{ |
@@ -7,7 +7,8 @@ using System.Web; | |||
using System.Web.Mvc; | |||
using System.Web.UI; | |||
using Teknik.Configuration; | |||
using Teknik.Helpers; | |||
using Teknik.Utilities; | |||
using Teknik.Piwik; | |||
namespace Teknik.Filters | |||
{ |
@@ -5,9 +5,8 @@ using System.Text; | |||
using System.Threading.Tasks; | |||
using System.Web; | |||
using System.Web.Mvc; | |||
using System.Web.UI; | |||
using Teknik.Configuration; | |||
using Teknik.Helpers; | |||
using Teknik.Piwik; | |||
namespace Teknik.Filters | |||
{ |
@@ -7,7 +7,8 @@ using System.Web; | |||
using System.Web.Mvc; | |||
using System.Web.UI; | |||
using Teknik.Configuration; | |||
using Teknik.Helpers; | |||
using Teknik.Utilities; | |||
using Teknik.Piwik; | |||
namespace Teknik.Filters | |||
{ |
@@ -8,18 +8,11 @@ using System.Web.Routing; | |||
using Teknik.Models; | |||
using System.Data.Entity; | |||
using System.Web.Security; | |||
using Teknik.Migrations; | |||
using System.Data.Entity.Migrations; | |||
using Teknik.Areas.Users.Models; | |||
using System.ComponentModel; | |||
using Teknik.Areas.Error.Controllers; | |||
using System.Web.Helpers; | |||
using System.Diagnostics; | |||
using System.Collections.Specialized; | |||
using Teknik.Configuration; | |||
using Piwik.Tracker; | |||
using System.Web.UI; | |||
using Teknik.Helpers; | |||
using Teknik.Utilities; | |||
namespace Teknik | |||
{ |
@@ -1,9 +1,6 @@ | |||
namespace Teknik.Migrations | |||
{ | |||
using Areas.Paste; | |||
using Areas.Upload; | |||
using Areas.Users.Utility; | |||
using Helpers; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Data.Entity; | |||
@@ -12,6 +9,7 @@ namespace Teknik.Migrations | |||
using System.Linq; | |||
using System.Net; | |||
using Teknik.Configuration; | |||
using Utilities; | |||
internal sealed class Configuration : DbMigrationsConfiguration<Models.TeknikEntities> | |||
{ |
@@ -4,7 +4,7 @@ | |||
* intended to be used only for design-time IntelliSense. Please use the | |||
* standard jQuery library for all production use. | |||
* | |||
* Comment version: 1.15.0 | |||
* Comment version: 1.16.0 | |||
*/ | |||
/* | |||
@@ -15,7 +15,7 @@ | |||
* for informational purposes only and are not the license terms under | |||
* which Microsoft distributed this file. | |||
* | |||
* jQuery Validation Plugin - v1.15.0 - 2/4/2013 | |||
* jQuery Validation Plugin - v1.16.0 - 12/5/2016 | |||
* https://github.com/jzaefferer/jquery-validation | |||
* Copyright (c) 2013 Jörn Zaefferer; Licensed MIT | |||
* |
@@ -1,5 +1,5 @@ | |||
/*! | |||
* jQuery Validation Plugin v1.15.1 | |||
* jQuery Validation Plugin v1.16.0 | |||
* | |||
* http://jqueryvalidation.org/ | |||
* | |||
@@ -204,7 +204,7 @@ $.extend( $.fn, { | |||
} ); | |||
// Custom selectors | |||
$.extend( $.expr[ ":" ], { | |||
$.extend( $.expr.pseudos || $.expr[ ":" ], { // '|| $.expr[ ":" ]' here enables backwards compatibility to jQuery 1.7. Can be removed when dropping jQ 1.7.x support | |||
// http://jqueryvalidation.org/blank-selector/ | |||
blank: function( a ) { | |||
@@ -417,7 +417,7 @@ $.extend( $.validator, { | |||
":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], " + | |||
"[type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], " + | |||
"[type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], " + | |||
"[type='radio'], [type='checkbox'], [contenteditable]", delegate ) | |||
"[type='radio'], [type='checkbox'], [contenteditable], [type='button']", delegate ) | |||
// Support: Chrome, oldIE | |||
// "select" is provided as event.target when clicking a option | |||
@@ -1570,5 +1570,5 @@ if ( $.ajaxPrefilter ) { | |||
return ajax.apply( this, arguments ); | |||
}; | |||
} | |||
return $; | |||
})); |
@@ -73,8 +73,8 @@ | |||
<HintPath>..\packages\Microsoft.AspNet.Identity.EntityFramework.2.2.1\lib\net45\Microsoft.AspNet.Identity.EntityFramework.dll</HintPath> | |||
<Private>True</Private> | |||
</Reference> | |||
<Reference Include="Microsoft.Azure.KeyVault.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> | |||
<HintPath>..\packages\Microsoft.Azure.KeyVault.Core.1.0.0\lib\net40\Microsoft.Azure.KeyVault.Core.dll</HintPath> | |||
<Reference Include="Microsoft.Azure.KeyVault.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> | |||
<HintPath>..\packages\Microsoft.Azure.KeyVault.Core.2.0.4\lib\net45\Microsoft.Azure.KeyVault.Core.dll</HintPath> | |||
<Private>True</Private> | |||
</Reference> | |||
<Reference Include="Microsoft.CSharp" /> | |||
@@ -95,8 +95,8 @@ | |||
<Private>True</Private> | |||
</Reference> | |||
<Reference Include="PresentationFramework" /> | |||
<Reference Include="QRCoder, Version=1.2.2.0, Culture=neutral, processorArchitecture=MSIL"> | |||
<HintPath>..\packages\QRCoder.1.2.2\lib\net40\QRCoder.dll</HintPath> | |||
<Reference Include="QRCoder, Version=1.2.3.0, Culture=neutral, processorArchitecture=MSIL"> | |||
<HintPath>..\packages\QRCoder.1.2.3\lib\net40\QRCoder.dll</HintPath> | |||
<Private>True</Private> | |||
</Reference> | |||
<Reference Include="SecurityDriven.Inferno, Version=1.4.0.0, Culture=neutral, processorArchitecture=MSIL"> | |||
@@ -167,7 +167,7 @@ | |||
<Private>True</Private> | |||
</Reference> | |||
<Reference Include="UnityEngine, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | |||
<HintPath>..\packages\QRCoder.1.2.2\lib\net40\UnityEngine.dll</HintPath> | |||
<HintPath>..\packages\QRCoder.1.2.3\lib\net40\UnityEngine.dll</HintPath> | |||
<Private>True</Private> | |||
</Reference> | |||
<Reference Include="WebGrease, Version=1.6.5135.21930, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> | |||
@@ -241,9 +241,7 @@ | |||
<Compile Include="Areas\User\Models\TrustedDevice.cs" /> | |||
<Compile Include="Areas\User\ViewModels\TwoFactorViewModel.cs" /> | |||
<Compile Include="Attributes\TeknikAuthorizeAttribute.cs" /> | |||
<Compile Include="Configuration\LoggingConfig.cs" /> | |||
<Compile Include="Filters\CORSActionFilter.cs" /> | |||
<Compile Include="Helpers\BundleExtensions.cs" /> | |||
<Compile Include="Models\TransferTypes.cs" /> | |||
<Compile Include="Areas\User\Models\UploadSettings.cs" /> | |||
<Compile Include="Areas\User\Models\UserSettings.cs" /> | |||
@@ -291,22 +289,7 @@ | |||
<Compile Include="Areas\Vault\VaultAreaRegistration.cs" /> | |||
<Compile Include="Areas\Vault\ViewModels\VaultViewModel.cs" /> | |||
<Compile Include="Attributes\EntityAttribute.cs" /> | |||
<Compile Include="Configuration\PiwikConfig.cs" /> | |||
<Compile Include="Configuration\ShortenerConfig.cs" /> | |||
<Compile Include="Configuration\TransparencyConfig.cs" /> | |||
<Compile Include="Configuration\StreamConfig.cs" /> | |||
<Compile Include="Configuration\ApiConfig.cs" /> | |||
<Compile Include="Configuration\DatabaseConfig.cs" /> | |||
<Compile Include="Configuration\EmailConfig.cs" /> | |||
<Compile Include="Configuration\GitConfig.cs" /> | |||
<Compile Include="Configuration\PodcastConfig.cs" /> | |||
<Compile Include="Configuration\BlogConfig.cs" /> | |||
<Compile Include="Configuration\Config.cs" /> | |||
<Compile Include="Areas\Blog\Controllers\BlogController.cs" /> | |||
<Compile Include="Configuration\PasteConfig.cs" /> | |||
<Compile Include="Configuration\ContactConfig.cs" /> | |||
<Compile Include="Configuration\UploadConfig.cs" /> | |||
<Compile Include="Configuration\UserConfig.cs" /> | |||
<Compile Include="Controllers\DefaultController.cs" /> | |||
<Compile Include="Areas\Dev\Controllers\DevController.cs" /> | |||
<Compile Include="Filters\TrackLink.cs" /> | |||
@@ -315,24 +298,9 @@ | |||
<Compile Include="Global.asax.cs"> | |||
<DependentUpon>Global.asax</DependentUpon> | |||
</Compile> | |||
<Compile Include="Helpers\ActionResultHelper.cs" /> | |||
<Compile Include="Helpers\Constants.cs" /> | |||
<Compile Include="Helpers\Crypto.cs" /> | |||
<Compile Include="Areas\User\Models\Group.cs" /> | |||
<Compile Include="Areas\Blog\Models\BlogPost.cs" /> | |||
<Compile Include="Areas\User\Models\Role.cs" /> | |||
<Compile Include="Helpers\ExceptionExtensions.cs" /> | |||
<Compile Include="Helpers\HttpRequestExtensions.cs" /> | |||
<Compile Include="Helpers\MysqlDatabase.cs" /> | |||
<Compile Include="Helpers\MarkdownHelper.cs" /> | |||
<Compile Include="Helpers\RequestHelper.cs" /> | |||
<Compile Include="Helpers\RSSFeedResult.cs" /> | |||
<Compile Include="Helpers\Tracking.cs" /> | |||
<Compile Include="Helpers\UrlExtensions.cs" /> | |||
<Compile Include="Helpers\Utility.cs" /> | |||
<Compile Include="Helpers\WebClientExtension.cs"> | |||
<SubType>Component</SubType> | |||
</Compile> | |||
<Compile Include="Migrations\Configuration.cs" /> | |||
<Compile Include="Models\TeknikEntities.cs" /> | |||
<Compile Include="Areas\User\Models\User.cs" /> | |||
@@ -572,11 +540,6 @@ | |||
<Content Include="Areas\User\Views\User\ResetPasswordVerification.cshtml" /> | |||
<Content Include="Areas\User\Views\User\ResetPassword.cshtml" /> | |||
<Content Include="Areas\User\Views\User\TwoFactorCheck.cshtml" /> | |||
<Content Include="Fonts\FontAwesome.otf" /> | |||
<Content Include="Fonts\fontawesome-webfont.woff2" /> | |||
<Content Include="Fonts\fontawesome-webfont.woff" /> | |||
<Content Include="Fonts\fontawesome-webfont.ttf" /> | |||
<Content Include="Fonts\fontawesome-webfont.eot" /> | |||
<Content Include="Fonts\glyphicons-halflings-regular.woff2" /> | |||
<Content Include="Fonts\glyphicons-halflings-regular.woff" /> | |||
<Content Include="Fonts\glyphicons-halflings-regular.ttf" /> | |||
@@ -598,6 +561,11 @@ | |||
<Content Include="App_Data\MachineKey.config" /> | |||
<Content Include="Areas\Admin\Views\Admin\UserInfo.cshtml" /> | |||
<Content Include="Areas\Shortener\Views\Shortener\Verify.cshtml" /> | |||
<Content Include="Fonts\FontAwesome.otf" /> | |||
<Content Include="Fonts\fontawesome-webfont.woff2" /> | |||
<Content Include="Fonts\fontawesome-webfont.woff" /> | |||
<Content Include="Fonts\fontawesome-webfont.ttf" /> | |||
<Content Include="Fonts\fontawesome-webfont.eot" /> | |||
<None Include="Properties\PublishProfiles\Teknik Dev.pubxml" /> | |||
<None Include="Properties\PublishProfiles\Teknik Production.pubxml" /> | |||
<None Include="Scripts\jquery-2.1.4.intellisense.js" /> | |||
@@ -720,6 +688,14 @@ | |||
<WCFMetadata Include="Service References\" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<ProjectReference Include="..\Utilities\Configuration\Configuration.csproj"> | |||
<Project>{f0da1b67-af92-4b4a-8669-7e81645ff996}</Project> | |||
<Name>Configuration</Name> | |||
</ProjectReference> | |||
<ProjectReference Include="..\Utilities\Piwik\Piwik.csproj"> | |||
<Project>{C492C2C6-D45A-498B-84A2-6D4C8BF9DE77}</Project> | |||
<Name>Piwik</Name> | |||
</ProjectReference> | |||
<ProjectReference Include="..\Utilities\Utilities\Utilities.csproj"> | |||
<Project>{f45de6fc-3754-4954-a20a-4277362cc6c1}</Project> | |||
<Name>Utilities</Name> | |||
@@ -771,12 +747,12 @@ | |||
</FlavorProperties> | |||
</VisualStudio> | |||
</ProjectExtensions> | |||
<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. |
@@ -3,7 +3,7 @@ using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Web; | |||
using Teknik.Configuration; | |||
using Teknik.Helpers; | |||
using Teknik.Utilities; | |||
namespace Teknik.ViewModels | |||
{ |
@@ -1,6 +1,6 @@ | |||
@model Teknik.ViewModels.ViewModelBase | |||
@using Teknik.Helpers | |||
@using Teknik.Utilities | |||
<!DOCTYPE html> | |||
<html lang="en"> |
@@ -2,7 +2,7 @@ | |||
@Html.Partial("../../Areas/User/Views/User/_LoginModalPartial", Model) | |||
@using Teknik.Helpers | |||
@using Teknik.Utilities | |||
@{ | |||
string logoPath = Url.SubRouteUrl("www", "Default.Logo"); |