mirror of
https://github.com/kanidm/kanidm.git
synced 2025-06-09 09:37:46 +02:00
Prevented API request with empty scopemap
This commit is contained in:
parent
7a9bb9eac2
commit
8fecd1332a
|
@ -200,6 +200,11 @@ pub(crate) async fn oauth2_id_scopemap_post(
|
|||
Json(scopes): Json<Vec<String>>,
|
||||
) -> Result<Json<()>, WebError> {
|
||||
let filter = oauth2_id(&rs_name);
|
||||
|
||||
if scopes.is_empty() {
|
||||
return Err(WebError::OperationError(OperationError::EmptyRequest));
|
||||
}
|
||||
|
||||
state
|
||||
.qe_w_ref
|
||||
.handle_oauth2_scopemap_update(client_auth_info, group, scopes, filter, kopid.eventid)
|
||||
|
|
Loading…
Reference in a new issue