From 2483136618839f2e743a83daef46d2793813a823 Mon Sep 17 00:00:00 2001 From: openGaussDev Date: Thu, 10 Mar 2022 15:28:39 +0800 Subject: [PATCH] =?UTF-8?q?=20=E5=BD=93=E5=8F=A3=E4=BB=A4=E4=BD=9C?= =?UTF-8?q?=E4=B8=BA=E8=84=9A=E6=9C=AC=E6=88=96=E5=91=BD=E4=BB=A4=E7=9A=84?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E6=97=B6=EF=BC=8C=E7=A6=81=E6=AD=A2=E9=80=9A?= =?UTF-8?q?=E8=BF=87=E5=8E=86=E5=8F=B2=E6=93=8D=E4=BD=9C=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=EF=BC=88=E5=A6=82=E4=B8=8A=E4=B8=8B=E9=94=AE=E3=80=81ctrl=20+?= =?UTF-8?q?=20r=E3=80=81=E5=8E=86=E5=8F=B2=E8=AE=B0=E5=BD=95=E5=91=BD?= =?UTF-8?q?=E4=BB=A4=EF=BC=89=E7=AD=89=E6=96=B9=E5=BC=8F=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=8F=A3=E4=BB=A4=E7=AD=89=E6=95=8F=E6=84=9F=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Offering: openGaussDev More detail: 当口令作为脚本或命令的参数时,禁止通过历史操作查询(如上下键、ctrl + r、历史记录命令)等方式显示口令等敏感信息。 Match-id-1d8922456b1511c4f818ceaa37bf0755a1023217 --- src/bin/psql/input.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bin/psql/input.cpp b/src/bin/psql/input.cpp index 1a9365f62..5b804f32a 100644 --- a/src/bin/psql/input.cpp +++ b/src/bin/psql/input.cpp @@ -245,7 +245,8 @@ bool SensitiveStrCheck(const char* target) if (strstr(target_copy, "PASSWORD") != NULL || strstr(target_copy, "IDENTIFIED") != NULL || strstr(target_copy, "GS_ENCRYPT_AES128") != NULL || strstr(target_copy, "GS_DECRYPT_AES128") != NULL || strstr(target_copy, "GS_ENCRYPT") != NULL || strstr(target_copy, "GS_DECRYPT") != NULL || - strstr(target_copy, "PG_CREATE_PHYSICAL_REPLICATION_SLOT_EXTERN") != NULL) { + strstr(target_copy, "PG_CREATE_PHYSICAL_REPLICATION_SLOT_EXTERN") != NULL || + strstr(target_copy, "SECRETKEY") != NULL || strstr(target_copy, "CREATE_CREDENTIAL") != NULL) { free(target_copy); return TRUE; } else {