Changeset 14671 in josm
- Timestamp:
- 2019-01-10T08:24:43+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/ShowStatusReportAction.java
r14397 r14671 16 16 import java.util.Arrays; 17 17 import java.util.Collection; 18 import java.util.HashSet;19 18 import java.util.List; 20 19 import java.util.ListIterator; 21 20 import java.util.Locale; 22 import java.util.Map;23 import java.util.Map.Entry;24 21 import java.util.Set; 25 22 import java.util.stream.Collectors; … … 40 37 import org.openstreetmap.josm.plugins.PluginHandler; 41 38 import org.openstreetmap.josm.spi.preferences.Config; 42 import org.openstreetmap.josm.spi.preferences.Setting;43 39 import org.openstreetmap.josm.tools.Logging; 44 40 import org.openstreetmap.josm.tools.PlatformHookUnixoid; … … 277 273 String reportHeader = getReportHeader(); 278 274 text.append(reportHeader); 279 Map<String, Setting<?>> settings = Preferences.main().getAllSettings(); 280 Set<String> keys = new HashSet<>(settings.keySet()); 281 for (String key : keys) { 282 // Remove sensitive information from status report 283 if (key.startsWith("marker.show") || key.contains("username") || key.contains("password") || key.contains("access-token")) { 284 settings.remove(key); 285 } 286 } 287 for (Entry<String, Setting<?>> entry : settings.entrySet()) { 288 text.append(paramCleanup(entry.getKey())) 289 .append('=') 290 .append(paramCleanup(entry.getValue().getValue().toString())).append('\n'); 291 } 275 276 Preferences.main().getAllSettings().forEach((key, setting) -> { 277 if (key.startsWith("marker.show") 278 || key.equals("file-open.history") 279 || key.equals("download.overpass.query") 280 || key.equals("download.overpass.queries") 281 || key.contains("username") 282 || key.contains("password") 283 || key.contains("access-token")) { 284 // Remove sensitive information from status report 285 return; 286 } 287 text.append(paramCleanup(key)) 288 .append('=') 289 .append(paramCleanup(setting.getValue().toString())) 290 .append('\n'); 291 }); 292 292 293 293 DebugTextDisplay ta = new DebugTextDisplay(text.toString());
Note:
See TracChangeset
for help on using the changeset viewer.