Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/changelog/112400.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pr: 112400
summary: Make sure file accesses in `DnRoleMapper` are done in stack frames with permissions
area: Infra/Core
type: bug
issues: []
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ public static Map<String, List<String>> parseFile(Path path, Logger logger, Stri
}

try {
Settings settings = Settings.builder().loadFromPath(path).build();
// create this here so it's in an allowed stack frame
var file = Files.newInputStream(path);
Settings settings = Settings.builder().loadFromStream(path.getFileName().toString(), file, false).build();

Map<DN, Set<String>> dnToRoles = new HashMap<>();
Set<String> roles = settings.names();
Expand Down