Merge pull request #19153 from Scroody/pid-null-error-fix
fix (bbb-web): Null pointer exception when parent meeting does not exist
This commit is contained in:
commit
1f14f9a333
@ -1152,6 +1152,11 @@ public class ParamsProcessorUtil {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean parentMeetingExists(String parentMeetingId) {
|
||||||
|
Meeting meeting = ServiceUtils.findMeetingFromMeetingID(parentMeetingId);
|
||||||
|
return meeting != null;
|
||||||
|
}
|
||||||
|
|
||||||
/*************************************************
|
/*************************************************
|
||||||
* Setters
|
* Setters
|
||||||
************************************************/
|
************************************************/
|
||||||
|
@ -130,9 +130,20 @@ class ApiController {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if(params.isBreakout == "true" && !params.parentMeetingID) {
|
Boolean isBreakoutRoom = false
|
||||||
invalid("parentMeetingIDMissing", "No parent meeting ID was provided for the breakout room")
|
if (!StringUtils.isEmpty(params.isBreakout)) {
|
||||||
return
|
isBreakoutRoom = Boolean.parseBoolean(params.isBreakout)
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isBreakoutRoom) {
|
||||||
|
if(StringUtils.isEmpty(params.parentMeetingID)) {
|
||||||
|
invalid("parentMeetingIDMissing", "No parent meeting ID was provided for the breakout room")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if(!paramsProcessorUtil.parentMeetingExists(params.parentMeetingID)) {
|
||||||
|
invalid("parentMeetingDoesNotExist", "No parent meeting exists for the breakout room")
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Ensure unique TelVoice. Uniqueness is not guaranteed by paramsProcessorUtil.
|
// Ensure unique TelVoice. Uniqueness is not guaranteed by paramsProcessorUtil.
|
||||||
|
Loading…
Reference in New Issue
Block a user