Skip to content

Commit

Permalink
Fix NPE if child channel has no parent (bsc#1231053)
Browse files Browse the repository at this point in the history
  • Loading branch information
mbussolotto committed Oct 23, 2024
1 parent 8bb8821 commit b65cbd1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,8 @@ else if (ksession != null) {

if (map.containsKey(CHILD) && !Config.get().getBoolean("ks_restrict_child_channels")) {
Channel child = ChannelFactory.lookupByLabel(map.get(CHILD));
if (child == null || tree == null || !child.getParentChannel().equals(tree.getChannel())) {
if (child == null || tree == null || child.getParentChannel() == null ||
!child.getParentChannel().equals(tree.getChannel())) {
response.sendError(HttpServletResponse.SC_NOT_FOUND);
return mapping.findForward("error");
}
Expand Down
1 change: 1 addition & 0 deletions java/spacewalk-java.changes.mbussolotto.npe_kickstart
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Fix NPE if child channel has no parent (bsc#1231053)

0 comments on commit b65cbd1

Please sign in to comment.