File tree 2 files changed +10
-3
lines changed
iterableapi/src/main/java/com/iterable/iterableapi
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) {
82
82
if (triggerExpirationRefreshTime > 0 ) {
83
83
scheduleAuthTokenRefresh (triggerExpirationRefreshTime );
84
84
} 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" );
86
86
}
87
87
} 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 );
89
89
}
90
90
}
91
91
Original file line number Diff line number Diff line change @@ -245,12 +245,19 @@ private static String buildHeaderString(HttpURLConnection urlConnection) {
245
245
Iterator <?> headerKeys = urlConnection .getRequestProperties ().keySet ().iterator ();
246
246
while (headerKeys .hasNext ()) {
247
247
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 " );
249
252
}
250
253
headerString .append ("}" );
251
254
return headerString .toString ();
252
255
}
253
256
257
+ private static boolean isSensitive (String key ) {
258
+ return (key .equals (IterableConstants .HEADER_API_KEY )) || key .equals (IterableConstants .HEADER_SDK_AUTHORIZATION );
259
+ }
260
+
254
261
@ Override
255
262
protected void onPostExecute (IterableApiResponse response ) {
256
263
boolean retryRequest = !response .success && response .responseCode >= 500 ;
You can’t perform that action at this time.
0 commit comments