From aa5ba4fa174fdeebeea4a37aea906a5652d912b6 Mon Sep 17 00:00:00 2001 From: "derek.holloway" Date: Fri, 22 Aug 2025 14:23:39 -0700 Subject: [PATCH 1/2] beefen up the auth server public key detector --- src/Server/Program.cs | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/Server/Program.cs b/src/Server/Program.cs index b4435a7..39be968 100755 --- a/src/Server/Program.cs +++ b/src/Server/Program.cs @@ -91,16 +91,23 @@ if (IPayment._PaymentType == PaymentType.StripeIntent) { RsaSecurityKey? PublicKey = null; using (HttpClient client = new HttpClient()) { while (PublicKey == null) { - HttpResponseMessage PublicKeyResponse = await client.GetAsync("https://auth.mistox.com/api/auth/publickey"); - if (PublicKeyResponse.IsSuccessStatusCode) { - string publicKey = await PublicKeyResponse.Content.ReadAsStringAsync(); - RSA rsa = RSA.Create(); - rsa.ImportFromPem(publicKey); - PublicKey = new RsaSecurityKey(rsa); - } else { + try { + HttpResponseMessage PublicKeyResponse = await client.GetAsync("https://auth.mistox.com/api/auth/publickey"); + if (PublicKeyResponse.IsSuccessStatusCode) { + string publicKey = await PublicKeyResponse.Content.ReadAsStringAsync(); + RSA rsa = RSA.Create(); + rsa.ImportFromPem(publicKey); + PublicKey = new RsaSecurityKey(rsa); + } else { + await Task.Delay(2000); // sleep the main thread for 2 seconds before sending another request. Prevent DDOS of my own equiptment + Console.WriteLine("auth.mistox.com returned error code: " + PublicKeyResponse.StatusCode); + } + } catch (Exception e) { await Task.Delay(2000); // sleep the main thread for 2 seconds before sending another request. Prevent DDOS of my own equiptment + Console.WriteLine("Error loading public key: " + e.InnerException?.Message); } } + Console.WriteLine("PublicKey loaded"); } builder.Services.AddAuthentication(options => { -- 2.52.0 From 0f74519fb5066901e03721357249ccb1327ea51d Mon Sep 17 00:00:00 2001 From: "derek.holloway" Date: Fri, 22 Aug 2025 14:23:58 -0700 Subject: [PATCH 2/2] Minor CSS updates --- src/Client/src/app/pages/home/home.component.css | 4 ++-- src/Client/src/app/pages/resumes/editor/editor.component.css | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Client/src/app/pages/home/home.component.css b/src/Client/src/app/pages/home/home.component.css index be3c1f6..d877bf3 100644 --- a/src/Client/src/app/pages/home/home.component.css +++ b/src/Client/src/app/pages/home/home.component.css @@ -1,6 +1,6 @@ .center-frame { - margin: 0 200px; - width: calc(100% - 400px); + margin: 0 auto; + max-width: 1400px; } .center-text { diff --git a/src/Client/src/app/pages/resumes/editor/editor.component.css b/src/Client/src/app/pages/resumes/editor/editor.component.css index ec41f96..be09ca3 100644 --- a/src/Client/src/app/pages/resumes/editor/editor.component.css +++ b/src/Client/src/app/pages/resumes/editor/editor.component.css @@ -46,13 +46,12 @@ h1 { } .resume-section { - break-inside: avoid; - background-color: #DDDDDD; margin-bottom: 10px; } .resume-sub-section { border: 1px solid #666666; + break-inside: avoid; padding: 10px; } -- 2.52.0