Permalink
Browse files

masking username and password credentails in the logs and spacing

  • Loading branch information...
1 parent e69ed3d commit 32e2c97b0e118629bcb7e68d66a21e659aed5759 @cesine cesine committed Feb 20, 2013
@@ -105,8 +105,8 @@ public void databaseClosing() {
}
public String toString() {
- String maskedRemoteWithoutCredentials = (remote != null ? remote.toExternalForm() : "");
- maskedRemoteWithoutCredentials = maskedRemoteWithoutCredentials.replaceAll("://.*:.*@","://---:---@");
+ String maskedRemoteWithoutCredentials = (remote != null ? remote.toExternalForm() : "");
+ maskedRemoteWithoutCredentials = maskedRemoteWithoutCredentials.replaceAll("://.*:.*@","://---:---@");
String name = getClass().getSimpleName() + "[" + maskedRemoteWithoutCredentials + "]";
return name;
}
@@ -186,7 +186,9 @@ public void process(HttpRequest request,
}
try {
- Log.v(TDDatabase.TAG, "Making request to " + getChangesFeedURL().toString());
+ String maskedRemoteWithoutCredentials = getChangesFeedURL().toString();
+ maskedRemoteWithoutCredentials = maskedRemoteWithoutCredentials.replaceAll("://.*:.*@","://---:---@");
+ Log.v(TDDatabase.TAG, "Making request to " + maskedRemoteWithoutCredentials);
HttpResponse response = httpClient.execute(request);
StatusLine status = response.getStatusLine();
if(status.getStatusCode() >= 300) {
@@ -226,6 +228,8 @@ public void process(HttpRequest request,
//we get an exception when we're shutting down and have to
//close the socket underneath our read, ignore that
Log.e(TDDatabase.TAG, "IOException in change tracker", e);
+ /* (cesine) trying to stop the looping. */
+ running = false;
}
}
}

0 comments on commit 32e2c97

Please sign in to comment.