Stopped some app_data files from overwriting publish dir files.tags/3.0.0^2
@@ -1 +0,0 @@ | |||
xn--cckl0itdpc9763ahlyc.tv |
@@ -44,7 +44,6 @@ namespace Teknik.Areas.API.Controllers | |||
[HttpPost] | |||
[AllowAnonymous] | |||
[ServiceFilter(typeof(TrackPageView))] | |||
public async Task<IActionResult> UploadAsync(APIv1UploadModel model) | |||
{ | |||
try | |||
@@ -197,7 +196,6 @@ namespace Teknik.Areas.API.Controllers | |||
[HttpPost] | |||
[AllowAnonymous] | |||
[ServiceFilter(typeof(TrackPageView))] | |||
public IActionResult Paste(APIv1PasteModel model) | |||
{ | |||
try | |||
@@ -242,7 +240,6 @@ namespace Teknik.Areas.API.Controllers | |||
[HttpPost] | |||
[AllowAnonymous] | |||
[ServiceFilter(typeof(TrackPageView))] | |||
public IActionResult Shorten(APIv1ShortenModel model) | |||
{ | |||
try |
@@ -22,7 +22,6 @@ namespace Teknik.Areas.About.Controllers | |||
public AboutController(ILogger<Logger> logger, Config config, TeknikEntities dbContext) : base(logger, config, dbContext) { } | |||
[AllowAnonymous] | |||
[ServiceFilter(typeof(TrackPageView))] | |||
public IActionResult Index([FromServices] Config config) | |||
{ | |||
ViewBag.Title = "About - " + config.Title; |
@@ -20,8 +20,7 @@ namespace Teknik.Areas.Abuse.Controllers | |||
public class AbuseController : DefaultController | |||
{ | |||
public AbuseController(ILogger<Logger> logger, Config config, TeknikEntities dbContext) : base(logger, config, dbContext) { } | |||
[ServiceFilter(typeof(TrackPageView))] | |||
[AllowAnonymous] | |||
public IActionResult Index() | |||
{ |
@@ -27,7 +27,6 @@ namespace Teknik.Areas.Admin.Controllers | |||
public AdminController(ILogger<Logger> logger, Config config, TeknikEntities dbContext) : base (logger, config, dbContext) { } | |||
[HttpGet] | |||
[ServiceFilter(typeof(TrackPageView))] | |||
public ActionResult Dashboard() | |||
{ | |||
DashboardViewModel model = new DashboardViewModel(); | |||
@@ -35,7 +34,6 @@ namespace Teknik.Areas.Admin.Controllers | |||
} | |||
[HttpGet] | |||
[ServiceFilter(typeof(TrackPageView))] | |||
public ActionResult UserSearch() | |||
{ | |||
UserSearchViewModel model = new UserSearchViewModel(); | |||
@@ -43,7 +41,6 @@ namespace Teknik.Areas.Admin.Controllers | |||
} | |||
[HttpGet] | |||
[ServiceFilter(typeof(TrackPageView))] | |||
public ActionResult UserInfo(string username) | |||
{ | |||
if (UserHelper.UserExists(_dbContext, username)) |
@@ -29,7 +29,6 @@ namespace Teknik.Areas.Blog.Controllers | |||
{ | |||
public BlogController(ILogger<Logger> logger, Config config, TeknikEntities dbContext) : base(logger, config, dbContext) { } | |||
[ServiceFilter(typeof(TrackPageView))] | |||
[AllowAnonymous] | |||
public IActionResult Blog(string username) | |||
{ | |||
@@ -119,7 +118,6 @@ namespace Teknik.Areas.Blog.Controllers | |||
} | |||
#region Posts | |||
[ServiceFilter(typeof(TrackPageView))] | |||
[AllowAnonymous] | |||
public IActionResult Post(string username, int id) | |||
{ |
@@ -25,7 +25,6 @@ namespace Teknik.Areas.Contact.Controllers | |||
{ | |||
public ContactController(ILogger<Logger> logger, Config config, TeknikEntities dbContext) : base(logger, config, dbContext) { } | |||
[ServiceFilter(typeof(TrackPageView))] | |||
[AllowAnonymous] | |||
public IActionResult Index() | |||
{ |
@@ -16,8 +16,7 @@ namespace Teknik.Areas.Dev.Controllers | |||
public class DevController : DefaultController | |||
{ | |||
public DevController(ILogger<Logger> logger, Config config, TeknikEntities dbContext) : base(logger, config, dbContext) { } | |||
[ServiceFilter(typeof(TrackPageView))] | |||
[AllowAnonymous] | |||
public IActionResult Index() | |||
{ |
@@ -16,8 +16,7 @@ namespace Teknik.Areas.FAQ.Controllers | |||
public class FAQController : DefaultController | |||
{ | |||
public FAQController(ILogger<Logger> logger, Config config, TeknikEntities dbContext) : base(logger, config, dbContext) { } | |||
[ServiceFilter(typeof(TrackPageView))] | |||
[AllowAnonymous] | |||
public IActionResult Index() | |||
{ |
@@ -17,7 +17,6 @@ namespace Teknik.Areas.Help.Controllers | |||
{ | |||
public HelpController(ILogger<Logger> logger, Config config, TeknikEntities dbContext) : base(logger, config, dbContext) { } | |||
[ServiceFilter(typeof(TrackPageView))] | |||
[AllowAnonymous] | |||
public IActionResult Index() | |||
{ | |||
@@ -25,8 +24,7 @@ namespace Teknik.Areas.Help.Controllers | |||
HelpViewModel model = new HelpViewModel(); | |||
return View(model); | |||
} | |||
[ServiceFilter(typeof(TrackPageView))] | |||
[AllowAnonymous] | |||
public IActionResult API(string version, string service) | |||
{ | |||
@@ -43,8 +41,7 @@ namespace Teknik.Areas.Help.Controllers | |||
} | |||
return RedirectToRoute("Error.Http404"); | |||
} | |||
[ServiceFilter(typeof(TrackPageView))] | |||
[AllowAnonymous] | |||
public IActionResult Blog() | |||
{ | |||
@@ -52,8 +49,7 @@ namespace Teknik.Areas.Help.Controllers | |||
HelpViewModel model = new HelpViewModel(); | |||
return View("~/Areas/Help/Views/Help/Blog.cshtml", model); | |||
} | |||
[ServiceFilter(typeof(TrackPageView))] | |||
[AllowAnonymous] | |||
public IActionResult Git() | |||
{ | |||
@@ -61,8 +57,7 @@ namespace Teknik.Areas.Help.Controllers | |||
HelpViewModel model = new HelpViewModel(); | |||
return View("~/Areas/Help/Views/Help/Git.cshtml", model); | |||
} | |||
[ServiceFilter(typeof(TrackPageView))] | |||
[AllowAnonymous] | |||
public IActionResult IRC() | |||
{ | |||
@@ -70,8 +65,7 @@ namespace Teknik.Areas.Help.Controllers | |||
HelpViewModel model = new HelpViewModel(); | |||
return View("~/Areas/Help/Views/Help/IRC.cshtml", model); | |||
} | |||
[ServiceFilter(typeof(TrackPageView))] | |||
[AllowAnonymous] | |||
public IActionResult Mail() | |||
{ | |||
@@ -79,8 +73,7 @@ namespace Teknik.Areas.Help.Controllers | |||
HelpViewModel model = new HelpViewModel(); | |||
return View("~/Areas/Help/Views/Help/Mail.cshtml", model); | |||
} | |||
[ServiceFilter(typeof(TrackPageView))] | |||
[AllowAnonymous] | |||
public IActionResult Markdown() | |||
{ | |||
@@ -88,8 +81,7 @@ namespace Teknik.Areas.Help.Controllers | |||
HelpViewModel model = new HelpViewModel(); | |||
return View("~/Areas/Help/Views/Help/Markdown.cshtml", model); | |||
} | |||
[ServiceFilter(typeof(TrackPageView))] | |||
[AllowAnonymous] | |||
public IActionResult Mumble() | |||
{ | |||
@@ -97,8 +89,7 @@ namespace Teknik.Areas.Help.Controllers | |||
HelpViewModel model = new HelpViewModel(); | |||
return View("~/Areas/Help/Views/Help/Mumble.cshtml", model); | |||
} | |||
[ServiceFilter(typeof(TrackPageView))] | |||
[AllowAnonymous] | |||
public IActionResult RSS() | |||
{ | |||
@@ -106,8 +97,7 @@ namespace Teknik.Areas.Help.Controllers | |||
HelpViewModel model = new HelpViewModel(); | |||
return View("~/Areas/Help/Views/Help/RSS.cshtml", model); | |||
} | |||
[ServiceFilter(typeof(TrackPageView))] | |||
[AllowAnonymous] | |||
public IActionResult Tools() | |||
{ | |||
@@ -115,8 +105,7 @@ namespace Teknik.Areas.Help.Controllers | |||
HelpViewModel model = new HelpViewModel(); | |||
return View("~/Areas/Help/Views/Help/Tools.cshtml", model); | |||
} | |||
[ServiceFilter(typeof(TrackPageView))] | |||
[AllowAnonymous] | |||
public IActionResult Upload() | |||
{ |
@@ -21,8 +21,7 @@ namespace Teknik.Areas.Home.Controllers | |||
public class HomeController : DefaultController | |||
{ | |||
public HomeController(ILogger<Logger> logger, Config config, TeknikEntities dbContext) : base(logger, config, dbContext) { } | |||
[ServiceFilter(typeof(TrackPageView))] | |||
[AllowAnonymous] | |||
public IActionResult Index() | |||
{ |
@@ -26,8 +26,7 @@ namespace Teknik.Areas.Paste.Controllers | |||
public class PasteController : DefaultController | |||
{ | |||
public PasteController(ILogger<Logger> logger, Config config, TeknikEntities dbContext) : base(logger, config, dbContext) { } | |||
[ServiceFilter(typeof(TrackPageView))] | |||
[AllowAnonymous] | |||
public IActionResult Index() | |||
{ | |||
@@ -36,8 +35,7 @@ namespace Teknik.Areas.Paste.Controllers | |||
PasteCreateViewModel model = new PasteCreateViewModel(); | |||
return View(model); | |||
} | |||
[ServiceFilter(typeof(TrackDownload))] | |||
[AllowAnonymous] | |||
public IActionResult ViewPaste(string type, string url, string password) | |||
{ |
@@ -27,8 +27,7 @@ namespace Teknik.Areas.Podcast.Controllers | |||
public class PodcastController : DefaultController | |||
{ | |||
public PodcastController(ILogger<Logger> logger, Config config, TeknikEntities dbContext) : base(logger, config, dbContext) { } | |||
[ServiceFilter(typeof(TrackPageView))] | |||
[AllowAnonymous] | |||
public IActionResult Index() | |||
{ | |||
@@ -63,7 +62,6 @@ namespace Teknik.Areas.Podcast.Controllers | |||
} | |||
#region Podcasts | |||
[ServiceFilter(typeof(TrackPageView))] | |||
[AllowAnonymous] | |||
public IActionResult View(int episode) | |||
{ | |||
@@ -84,7 +82,6 @@ namespace Teknik.Areas.Podcast.Controllers | |||
} | |||
[HttpGet] | |||
[ServiceFilter(typeof(TrackDownload))] | |||
[AllowAnonymous] | |||
[ResponseCache(Duration = 31536000, Location = ResponseCacheLocation.Any)] | |||
public IActionResult Download(int episode, string fileName) |
@@ -17,7 +17,6 @@ namespace Teknik.Areas.Privacy.Controllers | |||
{ | |||
public PrivacyController(ILogger<Logger> logger, Config config, TeknikEntities dbContext) : base(logger, config, dbContext) { } | |||
[ServiceFilter(typeof(TrackPageView))] | |||
[AllowAnonymous] | |||
public IActionResult Index() | |||
{ |
@@ -30,8 +30,7 @@ namespace Teknik.Areas.RSS.Controllers | |||
public class RSSController : DefaultController | |||
{ | |||
public RSSController(ILogger<Logger> logger, Config config, TeknikEntities dbContext) : base(logger, config, dbContext) { } | |||
[ServiceFilter(typeof(TrackDownload))] | |||
[AllowAnonymous] | |||
public async Task Index() | |||
{ | |||
@@ -48,8 +47,7 @@ namespace Teknik.Areas.RSS.Controllers | |||
await xmlWriter.FlushAsync(); | |||
} | |||
} | |||
[ServiceFilter(typeof(TrackDownload))] | |||
[AllowAnonymous] | |||
public async Task Blog(string username) | |||
{ | |||
@@ -154,8 +152,7 @@ namespace Teknik.Areas.RSS.Controllers | |||
} | |||
} | |||
[ServiceFilter(typeof(TrackDownload))] | |||
[AllowAnonymous] | |||
public async Task Podcast() | |||
{ |
@@ -21,8 +21,7 @@ namespace Teknik.Areas.Shortener.Controllers | |||
public class ShortenerController : DefaultController | |||
{ | |||
public ShortenerController(ILogger<Logger> logger, Config config, TeknikEntities dbContext) : base(logger, config, dbContext) { } | |||
[ServiceFilter(typeof(TrackPageView))] | |||
[AllowAnonymous] | |||
public IActionResult Index() | |||
{ | |||
@@ -30,8 +29,7 @@ namespace Teknik.Areas.Shortener.Controllers | |||
ShortenViewModel model = new ShortenViewModel(); | |||
return View(model); | |||
} | |||
[ServiceFilter(typeof(TrackLink))] | |||
[AllowAnonymous] | |||
public IActionResult RedirectToUrl(string url) | |||
{ |
@@ -22,8 +22,7 @@ namespace Teknik.Areas.Stats.Controllers | |||
public class StatsController : DefaultController | |||
{ | |||
public StatsController(ILogger<Logger> logger, Config config, TeknikEntities dbContext) : base(logger, config, dbContext) { } | |||
[ServiceFilter(typeof(TrackPageView))] | |||
[AllowAnonymous] | |||
public IActionResult Index() | |||
{ |
@@ -17,7 +17,6 @@ namespace Teknik.Areas.TOS.Controllers | |||
{ | |||
public TOSController(ILogger<Logger> logger, Config config, TeknikEntities dbContext) : base(logger, config, dbContext) { } | |||
[ServiceFilter(typeof(TrackPageView))] | |||
[AllowAnonymous] | |||
public IActionResult Index() | |||
{ |
@@ -32,7 +32,6 @@ namespace Teknik.Areas.Upload.Controllers | |||
public UploadController(ILogger<Logger> logger, Config config, TeknikEntities dbContext) : base(logger, config, dbContext) { } | |||
[HttpGet] | |||
[ServiceFilter(typeof(TrackPageView))] | |||
[AllowAnonymous] | |||
public IActionResult Index() | |||
{ | |||
@@ -142,7 +141,6 @@ namespace Teknik.Areas.Upload.Controllers | |||
// User did not supply key | |||
[HttpGet] | |||
[ServiceFilter(typeof(TrackDownload))] | |||
[AllowAnonymous] | |||
[ResponseCache(Duration = 31536000, Location = ResponseCacheLocation.Any)] | |||
public IActionResult Download(string file) |
@@ -35,8 +35,7 @@ namespace Teknik.Areas.Users.Controllers | |||
private static readonly UsedCodesManager usedCodesManager = new UsedCodesManager(); | |||
private const string _AuthSessionKey = "AuthenticatedUser"; | |||
[ServiceFilter(typeof(TrackPageView))] | |||
[AllowAnonymous] | |||
public IActionResult GetPremium() | |||
{ | |||
@@ -48,7 +47,6 @@ namespace Teknik.Areas.Users.Controllers | |||
} | |||
// GET: Profile/Profile | |||
[ServiceFilter(typeof(TrackPageView))] | |||
[AllowAnonymous] | |||
public IActionResult ViewProfile(string username) | |||
{ | |||
@@ -106,14 +104,12 @@ namespace Teknik.Areas.Users.Controllers | |||
} | |||
return View(model); | |||
} | |||
[ServiceFilter(typeof(TrackPageView))] | |||
public IActionResult Settings() | |||
{ | |||
return Redirect(Url.SubRouteUrl("user", "User.SecuritySettings")); | |||
} | |||
[ServiceFilter(typeof(TrackPageView))] | |||
public IActionResult ProfileSettings() | |||
{ | |||
string username = User.Identity.Name; | |||
@@ -139,8 +135,7 @@ namespace Teknik.Areas.Users.Controllers | |||
return Redirect(Url.SubRouteUrl("error", "Error.Http403")); | |||
} | |||
[ServiceFilter(typeof(TrackPageView))] | |||
public IActionResult SecuritySettings() | |||
{ | |||
string username = User.Identity.Name; | |||
@@ -181,8 +176,7 @@ namespace Teknik.Areas.Users.Controllers | |||
return Redirect(Url.SubRouteUrl("error", "Error.Http403")); | |||
} | |||
[ServiceFilter(typeof(TrackPageView))] | |||
public IActionResult InviteSettings() | |||
{ | |||
string username = User.Identity.Name; | |||
@@ -229,8 +223,7 @@ namespace Teknik.Areas.Users.Controllers | |||
return Redirect(Url.SubRouteUrl("error", "Error.Http403")); | |||
} | |||
[ServiceFilter(typeof(TrackPageView))] | |||
public IActionResult BlogSettings() | |||
{ | |||
string username = User.Identity.Name; | |||
@@ -255,8 +248,7 @@ namespace Teknik.Areas.Users.Controllers | |||
return Redirect(Url.SubRouteUrl("error", "Error.Http403")); | |||
} | |||
[ServiceFilter(typeof(TrackPageView))] | |||
public IActionResult UploadSettings() | |||
{ | |||
string username = User.Identity.Name; | |||
@@ -282,7 +274,6 @@ namespace Teknik.Areas.Users.Controllers | |||
} | |||
[HttpGet] | |||
[ServiceFilter(typeof(TrackPageView))] | |||
[AllowAnonymous] | |||
public IActionResult ViewRawPGP(string username) | |||
{ | |||
@@ -301,7 +292,6 @@ namespace Teknik.Areas.Users.Controllers | |||
} | |||
[HttpGet] | |||
[ServiceFilter(typeof(TrackPageView))] | |||
[AllowAnonymous] | |||
public IActionResult Login(string ReturnUrl) | |||
{ | |||
@@ -412,7 +402,6 @@ namespace Teknik.Areas.Users.Controllers | |||
} | |||
[HttpGet] | |||
[ServiceFilter(typeof(TrackPageView))] | |||
[AllowAnonymous] | |||
public IActionResult Register(string inviteCode, string ReturnUrl) | |||
{ |
@@ -28,8 +28,7 @@ namespace Teknik.Areas.Vault.Controllers | |||
public class VaultController : DefaultController | |||
{ | |||
public VaultController(ILogger<Logger> logger, Config config, TeknikEntities dbContext) : base(logger, config, dbContext) { } | |||
[ServiceFilter(typeof(TrackPageView))] | |||
[AllowAnonymous] | |||
public IActionResult ViewVault(string id) | |||
{ | |||
@@ -107,7 +106,6 @@ namespace Teknik.Areas.Vault.Controllers | |||
} | |||
[HttpGet] | |||
[ServiceFilter(typeof(TrackPageView))] | |||
[AllowAnonymous] | |||
public IActionResult NewVault() | |||
{ | |||
@@ -118,7 +116,6 @@ namespace Teknik.Areas.Vault.Controllers | |||
} | |||
[HttpGet] | |||
[ServiceFilter(typeof(TrackPageView))] | |||
[AllowAnonymous] | |||
public IActionResult NewVaultFromService(string type, string items) | |||
{ | |||
@@ -156,7 +153,6 @@ namespace Teknik.Areas.Vault.Controllers | |||
} | |||
[HttpGet] | |||
[ServiceFilter(typeof(TrackPageView))] | |||
public IActionResult EditVault(string url, string type, string items) | |||
{ | |||
ViewBag.Title = "Edit Vault"; |
@@ -63,9 +63,9 @@ namespace Teknik | |||
services.AddScoped<Config, Config>(opt => Config.Load(dataDir)); | |||
// Add Tracking Filter scopes | |||
services.AddScoped<TrackDownload>(); | |||
services.AddScoped<TrackLink>(); | |||
services.AddScoped<TrackPageView>(); | |||
//services.AddScoped<TrackDownload>(); | |||
//services.AddScoped<TrackLink>(); | |||
//services.AddScoped<TrackPageView>(); | |||
// Create the Database Context | |||
services.AddDbContext<TeknikEntities>(options => options |
@@ -84,21 +84,26 @@ | |||
<ItemGroup> | |||
<Content Update="App_Data\Config.json"> | |||
<CopyToPublishDirectory>Never</CopyToPublishDirectory> | |||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |||
</Content> | |||
<Content Update="App_Data\ConnectionStrings.config"> | |||
<CopyToPublishDirectory>Never</CopyToPublishDirectory> | |||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |||
</Content> | |||
<Content Update="App_Data\MachineKey.config"> | |||
<CopyToPublishDirectory>Never</CopyToPublishDirectory> | |||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |||
</Content> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<None Update="App_Data\ipBlacklist.txt"> | |||
<CopyToPublishDirectory>Never</CopyToPublishDirectory> | |||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |||
</None> | |||
<None Update="App_Data\referrerBlacklist.txt"> | |||
<CopyToPublishDirectory>Never</CopyToPublishDirectory> | |||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | |||
</None> | |||
<None Update="App_Data\reservedUsernames.txt"> |