Strip Double Quotes from Request Content in Organization API
Closes #34401 Signed-off-by: Jonas Suter <jonas_suter@gmx.ch>
This commit is contained in:
parent
1718a3ee94
commit
35b425736a
2 changed files with 4 additions and 0 deletions
|
@ -70,6 +70,8 @@ public class OrganizationIdentityProvidersResource {
|
|||
description = "Adds, or associates, an existing identity provider with the organization. If no identity provider is found, " +
|
||||
"or if it is already associated with the organization, an error response is returned")
|
||||
public Response addIdentityProvider(String id) {
|
||||
id = id.replaceAll("^\"|\"$", ""); // fixes https://github.com/keycloak/keycloak/issues/34401
|
||||
|
||||
try {
|
||||
IdentityProviderModel identityProvider = session.identityProviders().getByIdOrAlias(id);
|
||||
|
||||
|
|
|
@ -81,6 +81,8 @@ public class OrganizationMemberResource {
|
|||
"an existing user with the organization. If no user is found, or if it is already associated with the organization, " +
|
||||
"an error response is returned")
|
||||
public Response addMember(String id) {
|
||||
id = id.replaceAll("^\"|\"$", ""); // fixes https://github.com/keycloak/keycloak/issues/34401
|
||||
|
||||
UserModel user = session.users().getUserById(realm, id);
|
||||
|
||||
if (user == null) {
|
||||
|
|
Loading…
Reference in a new issue