mirror of
https://git.teknik.io/Teknikode/Teknik.git
synced 2023-08-02 14:16:22 +02:00
Small cleanups and fixes
This commit is contained in:
parent
8a6353f3da
commit
6865b5c5bc
1
.gitignore
vendored
1
.gitignore
vendored
@ -268,3 +268,4 @@ __pycache__/
|
|||||||
**/tempkey.rsa
|
**/tempkey.rsa
|
||||||
/ServiceWorker/Properties/launchSettings.json
|
/ServiceWorker/Properties/launchSettings.json
|
||||||
/IdentityServer/App_Data/Config.json
|
/IdentityServer/App_Data/Config.json
|
||||||
|
/ServiceWorker/Output
|
||||||
|
@ -0,0 +1,27 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
|
||||||
|
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||||
|
-->
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<WebPublishMethod>MSDeploy</WebPublishMethod>
|
||||||
|
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
|
||||||
|
<LastUsedPlatform>Any CPU</LastUsedPlatform>
|
||||||
|
<SiteUrlToLaunchAfterPublish>https://auth.teknik.io/</SiteUrlToLaunchAfterPublish>
|
||||||
|
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
|
||||||
|
<ExcludeApp_Data>True</ExcludeApp_Data>
|
||||||
|
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||||
|
<ProjectGuid>eb46e1eb-fdc2-4168-a0ad-8b284d44b13e</ProjectGuid>
|
||||||
|
<SelfContained>false</SelfContained>
|
||||||
|
<_IsPortable>true</_IsPortable>
|
||||||
|
<MSDeployServiceURL>ams1.teknik.io</MSDeployServiceURL>
|
||||||
|
<DeployIisAppPath>TeknikIdentity</DeployIisAppPath>
|
||||||
|
<RemoteSitePhysicalPath />
|
||||||
|
<SkipExtraFilesOnServer>True</SkipExtraFilesOnServer>
|
||||||
|
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
|
||||||
|
<EnableMSDeployBackup>True</EnableMSDeployBackup>
|
||||||
|
<UserName>Administrator</UserName>
|
||||||
|
<_SavePWD>True</_SavePWD>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
@ -0,0 +1,13 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||||
|
-->
|
||||||
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup>
|
||||||
|
<PublishProtocol>FileSystem</PublishProtocol>
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>Any CPU</Platform>
|
||||||
|
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||||
|
<PublishDir>Output\</PublishDir>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
@ -61,7 +61,7 @@ namespace Teknik.Areas.Error.Controllers
|
|||||||
{
|
{
|
||||||
Response.StatusCode = StatusCodes.Status401Unauthorized;
|
Response.StatusCode = StatusCodes.Status401Unauthorized;
|
||||||
|
|
||||||
ViewBag.Title = "401";
|
ViewBag.Title = "Unauthorized";
|
||||||
ViewBag.Description = "Unauthorized";
|
ViewBag.Description = "Unauthorized";
|
||||||
|
|
||||||
LogError(LogLevel.Error, "Unauthorized");
|
LogError(LogLevel.Error, "Unauthorized");
|
||||||
@ -77,7 +77,7 @@ namespace Teknik.Areas.Error.Controllers
|
|||||||
{
|
{
|
||||||
Response.StatusCode = StatusCodes.Status403Forbidden;
|
Response.StatusCode = StatusCodes.Status403Forbidden;
|
||||||
|
|
||||||
ViewBag.Title = "403";
|
ViewBag.Title = "Access Denied";
|
||||||
ViewBag.Description = "Access Denied";
|
ViewBag.Description = "Access Denied";
|
||||||
|
|
||||||
LogError(LogLevel.Error, "Access Denied");
|
LogError(LogLevel.Error, "Access Denied");
|
||||||
@ -93,7 +93,7 @@ namespace Teknik.Areas.Error.Controllers
|
|||||||
{
|
{
|
||||||
Response.StatusCode = StatusCodes.Status404NotFound;
|
Response.StatusCode = StatusCodes.Status404NotFound;
|
||||||
|
|
||||||
ViewBag.Title = "404";
|
ViewBag.Title = "Not Found";
|
||||||
ViewBag.Description = "Uh Oh, can't find it!";
|
ViewBag.Description = "Uh Oh, can't find it!";
|
||||||
|
|
||||||
LogError(LogLevel.Warning, "Page Not Found");
|
LogError(LogLevel.Warning, "Page Not Found");
|
||||||
@ -124,7 +124,7 @@ namespace Teknik.Areas.Error.Controllers
|
|||||||
|
|
||||||
Response.StatusCode = StatusCodes.Status500InternalServerError;
|
Response.StatusCode = StatusCodes.Status500InternalServerError;
|
||||||
|
|
||||||
ViewBag.Title = "500";
|
ViewBag.Title = "Server Error";
|
||||||
ViewBag.Description = "Something Borked";
|
ViewBag.Description = "Something Borked";
|
||||||
|
|
||||||
LogError(LogLevel.Error, "Server Error", exception);
|
LogError(LogLevel.Error, "Server Error", exception);
|
||||||
|
@ -1210,6 +1210,10 @@ namespace Teknik.Areas.Users.Controllers
|
|||||||
return Json(new { error = "You must enter an authorization callback URL" });
|
return Json(new { error = "You must enter an authorization callback URL" });
|
||||||
if (!callbackUrl.IsValidUrl())
|
if (!callbackUrl.IsValidUrl())
|
||||||
return Json(new { error = "Invalid callback URL" });
|
return Json(new { error = "Invalid callback URL" });
|
||||||
|
if (!string.IsNullOrEmpty(homepageUrl) && !homepageUrl.IsValidUrl())
|
||||||
|
return Json(new { error = "Invalid homepage URL" });
|
||||||
|
if (!string.IsNullOrEmpty(logoUrl) && !logoUrl.IsValidUrl())
|
||||||
|
return Json(new { error = "Invalid logo URL" });
|
||||||
|
|
||||||
// Validate the code with the identity server
|
// Validate the code with the identity server
|
||||||
var result = await IdentityHelper.CreateClient(_config, User.Identity.Name, name, homepageUrl, logoUrl, callbackUrl, "openid", "role", "account-info", "security-info", "teknik-api.read", "teknik-api.write");
|
var result = await IdentityHelper.CreateClient(_config, User.Identity.Name, name, homepageUrl, logoUrl, callbackUrl, "openid", "role", "account-info", "security-info", "teknik-api.read", "teknik-api.write");
|
||||||
@ -1271,6 +1275,10 @@ namespace Teknik.Areas.Users.Controllers
|
|||||||
return Json(new { error = "You must enter an authorization callback URL" });
|
return Json(new { error = "You must enter an authorization callback URL" });
|
||||||
if (!callbackUrl.IsValidUrl())
|
if (!callbackUrl.IsValidUrl())
|
||||||
return Json(new { error = "Invalid callback URL" });
|
return Json(new { error = "Invalid callback URL" });
|
||||||
|
if (!string.IsNullOrEmpty(homepageUrl) && !homepageUrl.IsValidUrl())
|
||||||
|
return Json(new { error = "Invalid homepage URL" });
|
||||||
|
if (!string.IsNullOrEmpty(logoUrl) && !logoUrl.IsValidUrl())
|
||||||
|
return Json(new { error = "Invalid logo URL" });
|
||||||
|
|
||||||
Client foundClient = await IdentityHelper.GetClient(_config, User.Identity.Name, clientId);
|
Client foundClient = await IdentityHelper.GetClient(_config, User.Identity.Name, clientId);
|
||||||
|
|
||||||
|
@ -678,7 +678,7 @@ If you recieved this email and you did not reset your password, you can ignore t
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
throw new Exception("Unable to disable email account.", ex);
|
throw new Exception("Unable to get email account status.", ex);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
@model Teknik.Areas.Users.ViewModels.ProfileViewModel
|
@model Teknik.Areas.Users.ViewModels.ProfileViewModel
|
||||||
|
|
||||||
@using Teknik.Utilities.Cryptography
|
@using Teknik.Utilities.Cryptography
|
||||||
|
@using Teknik.Areas.Users.Utility
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
@if (!Model.Error)
|
@if (!Model.Error)
|
||||||
@ -95,7 +96,7 @@
|
|||||||
{
|
{
|
||||||
<li class="list-group-item text-right"><span class="pull-left"><strong>Public Key</strong></span> <a href="#" data-toggle="modal" data-target="#pgpSignature">@pgpFingerprint64.AddStringAtInterval(4, " ")</a></li>
|
<li class="list-group-item text-right"><span class="pull-left"><strong>Public Key</strong></span> <a href="#" data-toggle="modal" data-target="#pgpSignature">@pgpFingerprint64.AddStringAtInterval(4, " ")</a></li>
|
||||||
}
|
}
|
||||||
@if (!string.IsNullOrEmpty(Model.Email) && Config.EmailConfig.Enabled)
|
@if (!string.IsNullOrEmpty(Model.Email) && Config.EmailConfig.Enabled && UserHelper.UserEmailEnabled(Config, Model.Email))
|
||||||
{
|
{
|
||||||
<li class="list-group-item text-right"><span class="pull-left"><strong>Email</strong></span> @(Html.Raw(User.Identity.IsAuthenticated ? $"<a href=\"mailto:{Model.Email}\">{Model.Email}</a>" : $"{Model.Username} at {Config.EmailConfig.Domain}"))</li>
|
<li class="list-group-item text-right"><span class="pull-left"><strong>Email</strong></span> @(Html.Raw(User.Identity.IsAuthenticated ? $"<a href=\"mailto:{Model.Email}\">{Model.Email}</a>" : $"{Model.Username} at {Config.EmailConfig.Domain}"))</li>
|
||||||
}
|
}
|
||||||
|
@ -5,18 +5,23 @@ by editing this MSBuild file. In order to learn more about this please visit htt
|
|||||||
-->
|
-->
|
||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<WebPublishMethod>FileSystem</WebPublishMethod>
|
<WebPublishMethod>MSDeploy</WebPublishMethod>
|
||||||
<PublishProvider>FileSystem</PublishProvider>
|
|
||||||
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
|
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
|
||||||
<LastUsedPlatform>Any CPU</LastUsedPlatform>
|
<LastUsedPlatform>Any CPU</LastUsedPlatform>
|
||||||
<SiteUrlToLaunchAfterPublish />
|
<SiteUrlToLaunchAfterPublish>https://www.teknik.io/</SiteUrlToLaunchAfterPublish>
|
||||||
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
|
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
|
||||||
<ExcludeApp_Data>False</ExcludeApp_Data>
|
<ExcludeApp_Data>False</ExcludeApp_Data>
|
||||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||||
<ProjectGuid>1e52f0d0-9e89-4022-a905-c685ef3564e1</ProjectGuid>
|
<ProjectGuid>1e52f0d0-9e89-4022-a905-c685ef3564e1</ProjectGuid>
|
||||||
<SelfContained>false</SelfContained>
|
<SelfContained>false</SelfContained>
|
||||||
<_IsPortable>true</_IsPortable>
|
<_IsPortable>true</_IsPortable>
|
||||||
<publishUrl>bin\Release\netcoreapp2.1\publish\</publishUrl>
|
<MSDeployServiceURL>ams1.teknik.io</MSDeployServiceURL>
|
||||||
<DeleteExistingFiles>False</DeleteExistingFiles>
|
<DeployIisAppPath>Teknik</DeployIisAppPath>
|
||||||
|
<RemoteSitePhysicalPath />
|
||||||
|
<SkipExtraFilesOnServer>True</SkipExtraFilesOnServer>
|
||||||
|
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
|
||||||
|
<EnableMSDeployBackup>True</EnableMSDeployBackup>
|
||||||
|
<UserName>Administrator</UserName>
|
||||||
|
<_SavePWD>True</_SavePWD>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
1606
Teknik/package-lock.json
generated
1606
Teknik/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user