Skip to content

Commit 13b91f2

Browse files
Ludy87Copilot
andauthored
Update app/proprietary/src/main/java/stirling/software/proprietary/controller/api/ProprietaryUIDataController.java
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 2a40049 commit 13b91f2

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

app/proprietary/src/main/java/stirling/software/proprietary/controller/api/ProprietaryUIDataController.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,9 @@ public ResponseEntity<AdminSettingsData> getAdminSettingsData(Authentication aut
309309
userRepository.findByIdWithSettings(user.getId()).orElse(user);
310310

311311
// Mask mfaSecret if present in settings
312-
Map<String, String> settingsCopy = new HashMap<>(userWithSettings.getSettings());
312+
Map<String, String> originalSettings = userWithSettings.getSettings();
313+
Map<String, String> settingsCopy =
314+
originalSettings != null ? new HashMap<>(originalSettings) : new HashMap<>();
313315
if (settingsCopy.containsKey("mfaSecret")) {
314316
settingsCopy.put("mfaSecret", "********");
315317
}

0 commit comments

Comments
 (0)