File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
iterableapi/src/main/java/com/iterable/iterableapi Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -82,10 +82,10 @@ public void queueExpirationRefresh(String encodedJWT) {
8282 if (triggerExpirationRefreshTime > 0 ) {
8383 scheduleAuthTokenRefresh (triggerExpirationRefreshTime );
8484 } else {
85- IterableLogger .w (TAG , "The expiringAuthTokenRefreshPeriod has already passed for the current JWT " + encodedJWT );
85+ IterableLogger .w (TAG , "The expiringAuthTokenRefreshPeriod has already passed for the current JWT" );
8686 }
8787 } catch (Exception e ) {
88- IterableLogger .e (TAG , "Error while parsing JWT for the expiration: " + encodedJWT , e );
88+ IterableLogger .e (TAG , "Error while parsing JWT for the expiration" , e );
8989 }
9090 }
9191
Original file line number Diff line number Diff line change @@ -245,12 +245,19 @@ private static String buildHeaderString(HttpURLConnection urlConnection) {
245245 Iterator <?> headerKeys = urlConnection .getRequestProperties ().keySet ().iterator ();
246246 while (headerKeys .hasNext ()) {
247247 String key = (String ) headerKeys .next ();
248- headerString .append (key + " : " + urlConnection .getRequestProperties ().get (key ) + "\n " );
248+ if (isSensitive (key )) {
249+ continue ;
250+ }
251+ headerString .append (key ).append (" : " ).append (urlConnection .getRequestProperties ().get (key )).append ("\n " );
249252 }
250253 headerString .append ("}" );
251254 return headerString .toString ();
252255 }
253256
257+ private static boolean isSensitive (String key ) {
258+ return (key .equals (IterableConstants .HEADER_API_KEY )) || key .equals (IterableConstants .HEADER_SDK_AUTHORIZATION );
259+ }
260+
254261 @ Override
255262 protected void onPostExecute (IterableApiResponse response ) {
256263 boolean retryRequest = !response .success && response .responseCode >= 500 ;
You can’t perform that action at this time.
0 commit comments