Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import java.util.concurrent.CompletableFuture;


import org.apache.servicecomb.foundation.common.utils.ExceptionUtils;
import org.apache.servicecomb.foundation.common.utils.SPIServiceUtils;
import org.apache.servicecomb.swagger.invocation.AsyncResponse;
import org.apache.servicecomb.swagger.invocation.Response;
Expand Down Expand Up @@ -153,7 +152,7 @@ public void doCompletableFutureInvoke(SwaggerInvocation invocation, AsyncRespons
} catch (Throwable e) {
if (shouldPrintErrorLog(e)) {
LOGGER.error("unexpected error operation={}, message={}",
invocation.getInvocationQualifiedName(), ExceptionUtils.getExceptionMessageWithoutTrace(e));
invocation.getInvocationQualifiedName(), e.getMessage());
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why modify this ? There is no SCB-2387 for this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not all of the sensitive contents can be blocked by this way. For example, the Jackson may put raw JSON string into exception message.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I'd prefer not modify this. This is not an actual serious information leak problem. And if the user's do need fix it, they can add try-catch block to avoid throw JsonParseException.

This information is quite useful for problem analysis and have modified many times.

}
invocation.onBusinessMethodFinish();
invocation.onBusinessFinish();
Expand Down Expand Up @@ -186,7 +185,7 @@ public Response doInvoke(SwaggerInvocation invocation) {
} catch (Throwable e) {
if (shouldPrintErrorLog(e)) {
LOGGER.error("unexpected error operation={}, message={}",
invocation.getInvocationQualifiedName(), ExceptionUtils.getExceptionMessageWithoutTrace(e));
invocation.getInvocationQualifiedName(), e.getMessage());
}
invocation.onBusinessMethodFinish();
invocation.onBusinessFinish();
Expand Down