From ef721fa41dec064cc562c6ecf028faa81d78a3d2 Mon Sep 17 00:00:00 2001 From: daneren2005 Date: Mon, 17 Jun 2013 16:13:11 -0600 Subject: Only log redirection when one actually occurs --- .../src/github/daneren2005/dsub/service/RESTMusicService.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'subsonic-android') diff --git a/subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java b/subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java index 0edd1a6d..513ce16a 100644 --- a/subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java +++ b/subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java @@ -1090,7 +1090,9 @@ public class RESTMusicService implements MusicService { redirectFrom = originalUrl.substring(0, originalUrl.indexOf("/rest/")); redirectTo = redirectedUrl.substring(0, redirectedUrl.indexOf("/rest/")); - Log.i(TAG, redirectFrom + " redirects to " + redirectTo); + if(redirectFrom.compareTo(redirectTo) != 0) { + Log.i(TAG, redirectFrom + " redirects to " + redirectTo); + } redirectionLastChecked = System.currentTimeMillis(); redirectionNetworkType = getCurrentNetworkType(context); } -- cgit v1.2.3 From b23a47f7eeda549a1898571bef61026e4003e04d Mon Sep 17 00:00:00 2001 From: daneren2005 Date: Mon, 17 Jun 2013 16:28:07 -0600 Subject: Strip out username/password from logging --- .../src/github/daneren2005/dsub/service/RESTMusicService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'subsonic-android') diff --git a/subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java b/subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java index 513ce16a..8beacfcb 100644 --- a/subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java +++ b/subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java @@ -982,7 +982,8 @@ public class RESTMusicService implements MusicService { private HttpResponse executeWithRetry(Context context, String url, String originalUrl, HttpParams requestParams, List parameterNames, List parameterValues, List
headers, ProgressListener progressListener, CancellableTask task) throws IOException { - Log.i(TAG, "Using URL " + url); + // Strip out sensitive information from log + Log.i(TAG, "Using URL " + url.substring(0, url.indexOf("&u")) + url.substring(url.indexOf("&v"))); SharedPreferences prefs = Util.getPreferences(context); int networkTimeout = Integer.parseInt(prefs.getString(Constants.PREFERENCES_KEY_NETWORK_TIMEOUT, "15000")); -- cgit v1.2.3 From 364e0ba02e3344025ba174f73af303c6f777975f Mon Sep 17 00:00:00 2001 From: daneren2005 Date: Mon, 17 Jun 2013 16:31:13 -0600 Subject: Fix typo on stripping out log info --- .../src/github/daneren2005/dsub/service/RESTMusicService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'subsonic-android') diff --git a/subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java b/subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java index 8beacfcb..ee8a384c 100644 --- a/subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java +++ b/subsonic-android/src/github/daneren2005/dsub/service/RESTMusicService.java @@ -983,7 +983,7 @@ public class RESTMusicService implements MusicService { List parameterNames, List parameterValues, List
headers, ProgressListener progressListener, CancellableTask task) throws IOException { // Strip out sensitive information from log - Log.i(TAG, "Using URL " + url.substring(0, url.indexOf("&u")) + url.substring(url.indexOf("&v"))); + Log.i(TAG, "Using URL " + url.substring(0, url.indexOf("?u=") + 1) + url.substring(url.indexOf("&v=") + 1)); SharedPreferences prefs = Util.getPreferences(context); int networkTimeout = Integer.parseInt(prefs.getString(Constants.PREFERENCES_KEY_NETWORK_TIMEOUT, "15000")); -- cgit v1.2.3