From d1a38126641ad2db43671e33744a3d6d833c07f2 Mon Sep 17 00:00:00 2001
From: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>
Date: Thu, 28 Jul 2022 17:36:22 +0100
Subject: [PATCH] Cyber tweaks
---
build/Version.props | 4 ++--
.../Security/OAuth/InvisionCommunityOAuthValidator.cs | 11 +++--------
2 files changed, 5 insertions(+), 10 deletions(-)
diff --git a/build/Version.props b/build/Version.props
index 6592d09c26..39031953f1 100644
--- a/build/Version.props
+++ b/build/Version.props
@@ -4,8 +4,8 @@
4.17.0
- 4.1.0
- 9.4.0
+ 4.2.0
+ 9.5.0
9.4.0
10.5.0
6.0.5
diff --git a/src/Tgstation.Server.Host/Security/OAuth/InvisionCommunityOAuthValidator.cs b/src/Tgstation.Server.Host/Security/OAuth/InvisionCommunityOAuthValidator.cs
index cd37c98b01..e0021d0143 100644
--- a/src/Tgstation.Server.Host/Security/OAuth/InvisionCommunityOAuthValidator.cs
+++ b/src/Tgstation.Server.Host/Security/OAuth/InvisionCommunityOAuthValidator.cs
@@ -10,7 +10,7 @@ using Tgstation.Server.Host.System;
namespace Tgstation.Server.Host.Security.OAuth
{
///
- /// OAuth validator for Discord.
+ /// OAuth validator for Invision Community (selfhosted).
///
sealed class InvisionCommunityOAuthValidator : GenericOAuthValidator
{
@@ -18,15 +18,10 @@ namespace Tgstation.Server.Host.Security.OAuth
public override OAuthProvider Provider => OAuthProvider.InvisionCommunity;
///
- protected override Uri TokenUrl => new Uri($"{BaseProtocolPath}/oauth/token/");
+ protected override Uri TokenUrl => new Uri($"{OAuthConfiguration.ServerUrl}/oauth/token/"); // This needs the trailing slash or it doesnt get the token. Do not remove.
///
- protected override Uri UserInformationUrl => new Uri($"{BaseProtocolPath}/api/core/me");
-
- ///
- /// Base path to the server's OAuth endpoint.
- ///
- string BaseProtocolPath => $"{OAuthConfiguration.ServerUrl}";
+ protected override Uri UserInformationUrl => new Uri($"{OAuthConfiguration.ServerUrl}/api/core/me");
///
/// Initializes a new instance of the class.