diff --git a/3PA/Lib/UpdateHandler.cs b/3PA/Lib/UpdateHandler.cs index 9f49e407..b52c3495 100644 --- a/3PA/Lib/UpdateHandler.cs +++ b/3PA/Lib/UpdateHandler.cs @@ -177,7 +177,7 @@ protected GitHubUpdater Updater { _gitHubUpdater = new GitHubUpdater { AssetDownloadFolder = Path.Combine(Config.FolderTemp, "downloads"), BasicAuthenticationToken = null, - OAuth2Token = Config.GitHubToken, + OAuth2Token = Encoding.ASCII.GetString(Convert.FromBase64String(Config.GitHubToken)), UserAgent = Config.GitHubUserAgent, Proxy = Config.Instance.GetWebClientProxy() }; diff --git a/3PA/Lib/User.cs b/3PA/Lib/User.cs index 04e39453..b1e053fd 100644 --- a/3PA/Lib/User.cs +++ b/3PA/Lib/User.cs @@ -20,6 +20,7 @@ using System; using System.IO; using System.Net; +using System.Text; using _3PA.MainFeatures; namespace _3PA.Lib { @@ -109,7 +110,7 @@ public static bool SendComment(string message, string url) { wb.OnInitHttpWebRequest += request => { request.Proxy = Config.Instance.GetWebClientProxy(); request.UserAgent = "3pUser"; - request.Headers.Add("Authorization", "Token " + Config.GitHubToken); + request.Headers.Add("Authorization", "Token " + Encoding.ASCII.GetString(Convert.FromBase64String(Config.GitHubToken))); }; wb.AddToReq("body", message); wb.OnRequestEnded += json => { UserCommunication.Notify((json.ResponseException != null ? json.ResponseException.ToString() : "") + "\r\n" + json.StatusCodeResponse + ":" + (json.StatusDescriptionResponse ?? "") + "\r\n" + (json.JsonResponse ?? "")); }; diff --git a/3PA/MainFeatures/Config.cs b/3PA/MainFeatures/Config.cs index c79c3bb3..3d8696c3 100644 --- a/3PA/MainFeatures/Config.cs +++ b/3PA/MainFeatures/Config.cs @@ -742,7 +742,7 @@ public static string GitHubUserAgent { } public static string GitHubToken { - get { return @"ae864fa362637283d43a341de349a5a212a2a1cc"; } + get { return @"MmViMDJlNWVlYWZlMTIzNGIxN2VmOTkxMGQ1NzljMTRkM2E1ZDEyMw=="; } } public static int UpdateCheckEveryXMin = 12 * 60;