From 4d131276d4db690017d2abcb1d05b60b1aac1958 Mon Sep 17 00:00:00 2001 From: Alberto Date: Fri, 18 Oct 2024 10:31:47 +0200 Subject: [PATCH 1/3] Correctly handle all 200 Spotnana responses --- libstuff/SHTTPSManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libstuff/SHTTPSManager.cpp b/libstuff/SHTTPSManager.cpp index 18d4aaf24..fa74c3b5e 100644 --- a/libstuff/SHTTPSManager.cpp +++ b/libstuff/SHTTPSManager.cpp @@ -93,7 +93,7 @@ void SStandaloneHTTPSManager::postPoll(fd_map& fdm, SStandaloneHTTPSManager::Tra // content. Why this is the what constitutes a valid response is lost to time. Any well-formed response should // be valid here, and this should get cleaned up. However, this requires testing anything that might rely on // the existing behavior, which is an exercise for later. - if (SContains(transaction.fullResponse.methodLine, " 200 ") || transaction.fullResponse.content.size()) { + if (SContains(transaction.fullResponse.methodLine, " 200") || transaction.fullResponse.content.size()) { // Pass the transaction down to the subclass. _onRecv(&transaction); } else { From 88eb63a1a04aba5a0ee5a8cf4f56ddada66efc61 Mon Sep 17 00:00:00 2001 From: Alberto Date: Fri, 18 Oct 2024 15:57:06 +0200 Subject: [PATCH 2/3] Update comment --- libstuff/SHTTPSManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libstuff/SHTTPSManager.cpp b/libstuff/SHTTPSManager.cpp index fa74c3b5e..ec2b9da49 100644 --- a/libstuff/SHTTPSManager.cpp +++ b/libstuff/SHTTPSManager.cpp @@ -89,7 +89,7 @@ void SStandaloneHTTPSManager::postPoll(fd_map& fdm, SStandaloneHTTPSManager::Tra // Shut down the socket, we're done with it. transaction.s->shutdown(Socket::CLOSED); - // This is supposed to check for a "200 OK" response, which it does very poorly. It also checks for message + // This is supposed to check for a "200" response, which it does very poorly. It also checks for message // content. Why this is the what constitutes a valid response is lost to time. Any well-formed response should // be valid here, and this should get cleaned up. However, this requires testing anything that might rely on // the existing behavior, which is an exercise for later. From 2e179241b07abc515599cae38e9a2af52c0332f7 Mon Sep 17 00:00:00 2001 From: Vit Horacek Date: Mon, 21 Oct 2024 17:41:06 +0900 Subject: [PATCH 3/3] Add the policy account Id to param whitelist --- libstuff/SLog.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libstuff/SLog.cpp b/libstuff/SLog.cpp index 584b6cb9a..36f8ad446 100644 --- a/libstuff/SLog.cpp +++ b/libstuff/SLog.cpp @@ -53,7 +53,8 @@ static const set PARAMS_WHITELIST = { "policyID", "companyName", "companyWebsite", - "invoice" + "invoice", + "policyAccountID" }; string addLogParams(string&& message, const map& params) {