dubbo icon indicating copy to clipboard operation
dubbo copied to clipboard

在消费端调用超时的情况下,异常打印包含方法调用参数的值,比较敏感。

Open liujiesmart opened this issue 7 years ago • 6 comments

DefaultFuture 类里面的方法会打印请求参数,涉及到敏感内容。

private String getTimeoutMessage(boolean scan) {
        long nowTimestamp = System.currentTimeMillis();
        return (sent > 0 ? "Waiting server-side response timeout" : "Sending request timeout in client-side")
                + (scan ? " by scan timer" : "") + ". start time: "
                + (new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS").format(new Date(start))) + ", end time: "
                + (new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS").format(new Date())) + ","
                + (sent > 0 ? " client elapsed: " + (sent - start)
                + " ms, server elapsed: " + (nowTimestamp - sent)
                : " elapsed: " + (nowTimestamp - start)) + " ms, timeout: "
                + timeout + " ms, request: " + request + ", channel: " + channel.getLocalAddress()
                + " -> " + channel.getRemoteAddress();
    }

request 的内容包含参数的值。

liujiesmart avatar May 24 '19 08:05 liujiesmart

dubbo这个管不来,敏感内容去做保密工作,我个人感觉是这样的...

it-zhouyu avatar May 24 '19 08:05 it-zhouyu

dubbo这个管不来,敏感内容去做保密工作,我个人感觉是这样的...

这个是框架把调用的参数给打出来了,如果含有手机号或者其他账号密码信息,比较致命。不是说程序能够处理的

liujiesmart avatar May 24 '19 08:05 liujiesmart

dubbo这个管不来,敏感内容去做保密工作,我个人感觉是这样的...

这个是框架把调用的参数给打出来了,如果含有手机号或者其他账号密码信息,比较致命。不是说程序能够处理的

这个字符串拼接出来是什么依赖你自己的 toString 方法吧

kexianjun avatar May 24 '19 09:05 kexianjun

I think this information is not sensitive information, the mobile phone number is not sensitive information, the password will be the encrypted string, the printing parameters can be more convenient to locate the problem, if you really feel that these parameters are unnecessary, you can rewrite it yourself.

Leishunyu avatar May 24 '19 09:05 Leishunyu

DefaultFuture类里面的方法会打印请求参数,涉及到敏感内容。

private String getTimeoutMessage(boolean scan) {
        long nowTimestamp = System.currentTimeMillis();
        return (sent > 0 ? "Waiting server-side response timeout" : "Sending request timeout in client-side")
                + (scan ? " by scan timer" : "") + ". start time: "
                + (new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS").format(new Date(start))) + ", end time: "
                + (new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS").format(new Date())) + ","
                + (sent > 0 ? " client elapsed: " + (sent - start)
                + " ms, server elapsed: " + (nowTimestamp - sent)
                : " elapsed: " + (nowTimestamp - start)) + " ms, timeout: "
                + timeout + " ms, request: " + request + ", channel: " + channel.getLocalAddress()
                + " -> " + channel.getRemoteAddress();
    }

request的内容包含参数的值。

我的建议是,将dubbo的日志输出做额外处理,比如日志文件路径、或日志级别上的调整,让日志数据更安全

manzhizhen avatar May 28 '19 06:05 manzhizhen

数据已经定义敏感了,就应该加密后传输

kakaCat avatar May 29 '19 11:05 kakaCat