Skip to content

Commit e1cc673

Browse files
committed
Merge pull request #1055 from DaanHoogland/CLOUDSTACK-9023
CLOUDSTACK-9023 filtering privatekey info from loggingtested off-line but rebased afterwards! * pr/1055: CLOUDSTACK-9023 filtering privatekey info from logging Signed-off-by: Remi Bergsma <github@remi.nl>
2 parents 62f57d2 + a580330 commit e1cc673

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

api/src/org/apache/cloudstack/api/command/admin/resource/UploadCustomCertificateCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
@APICommand(name = "uploadCustomCertificate",
3333
responseObject = CustomCertificateResponse.class,
3434
description = "Uploads a custom certificate for the console proxy VMs to use for SSL. Can be used to upload a single certificate signed by a known CA. Can also be used, through multiple calls, to upload a chain of certificates from CA to the custom certificate itself.",
35-
requestHasSensitiveInfo = false, responseHasSensitiveInfo = false)
35+
requestHasSensitiveInfo = true, responseHasSensitiveInfo = false)
3636
public class UploadCustomCertificateCmd extends BaseAsyncCmd {
3737
public static final Logger s_logger = Logger.getLogger(UploadCustomCertificateCmd.class.getName());
3838

utils/src/main/java/com/cloud/utils/StringUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ public static String getMaskedPasswordForDisplay(final String password) {
186186
private static final Pattern REGEX_PASSWORD_QUERYSTRING = Pattern.compile("(&|%26)?[^(&|%26)]*((p|P)assword|accesskey|secretkey)(=|%3D).*?(?=(%26|[&'\"]|$))");
187187

188188
// removes a password/accesskey/ property from a response json object
189-
private static final Pattern REGEX_PASSWORD_JSON = Pattern.compile("\"((p|P)assword|accesskey|secretkey)\":\\s?\".*?\",?");
189+
private static final Pattern REGEX_PASSWORD_JSON = Pattern.compile("\"((p|P)assword|privatekey|accesskey|secretkey)\":\\s?\".*?\",?");
190190

191191
private static final Pattern REGEX_PASSWORD_DETAILS = Pattern.compile("(&|%26)?details(\\[|%5B)\\d*(\\]|%5D)\\.key(=|%3D)((p|P)assword|accesskey|secretkey)(?=(%26|[&'\"]))");
192192

0 commit comments

Comments
 (0)