当口令作为脚本或命令的参数时,禁止通过历史操作查询(如上下键、ctrl + r、历史记录命令)等方式显示口令等敏感信息。

Offering: openGaussDev

More detail: 当口令作为脚本或命令的参数时,禁止通过历史操作查询(如上下键、ctrl + r、历史记录命令)等方式显示口令等敏感信息。

Match-id-1d8922456b1511c4f818ceaa37bf0755a1023217
This commit is contained in:
openGaussDev 2022-03-10 15:28:39 +08:00 committed by yanghao
parent e9c1bafa4c
commit 2483136618
1 changed files with 2 additions and 1 deletions

View File

@ -245,7 +245,8 @@ bool SensitiveStrCheck(const char* target)
if (strstr(target_copy, "PASSWORD") != NULL || strstr(target_copy, "IDENTIFIED") != NULL || 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_AES128") != NULL || strstr(target_copy, "GS_DECRYPT_AES128") != NULL ||
strstr(target_copy, "GS_ENCRYPT") != NULL || strstr(target_copy, "GS_DECRYPT") != 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); free(target_copy);
return TRUE; return TRUE;
} else { } else {