From 1bb300b2bb9f4990c6e19b9b8c33453416c24c95 Mon Sep 17 00:00:00 2001 From: Steve Hetzel Date: Thu, 4 Jan 2024 11:25:33 -0700 Subject: [PATCH] fix: remove slash char from error message --- LICENSE.txt | 2 +- src/webOAuthServer.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/LICENSE.txt b/LICENSE.txt index f2cee7bb61..6cfd873423 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright (c) 2023, Salesforce.com, Inc. +Copyright (c) 2024, Salesforce.com, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/src/webOAuthServer.ts b/src/webOAuthServer.ts index dc8841774e..f8ee59fad4 100644 --- a/src/webOAuthServer.ts +++ b/src/webOAuthServer.ts @@ -213,7 +213,7 @@ export class WebOAuthServer extends AsyncCreatable { private parseAuthCodeFromRequest(response: http.ServerResponse, request: WebOAuthServer.Request): Nullable { if (!this.validateState(request)) { const error = new SfError('urlStateMismatch'); - this.webServer.sendError(400, `${error.message}\n`, response); + this.webServer.sendError(400, error.message, response); this.closeRequest(request); this.logger.warn('urlStateMismatchAttempt detected.'); if (!get(this.webServer.server, 'urlStateMismatchAttempt')) {