Don't trust Webhook data

This commit is contained in:
Emmy D'Anello 2025-02-17 13:42:58 +01:00
parent bc3252b1f6
commit 8e4843a06c
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85

View File

@ -141,7 +141,7 @@ def webhook_receiver():
elif triggercode.startswith('USERGROUP_'):
with Connection(ldap_server, config.LDAP_BIND_USER, config.LDAP_BIND_PASSWORD) as ldap_conn:
dolibarr_group = dolibarr_client.call_get_api(f"users/groups/{obj['id']}")
manage_group_extra_fields(ldap_conn, obj)
manage_group_extra_fields(ldap_conn, dolibarr_group)
else:
abort(400)
return "", 204