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, " +
|
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")
|
"or if it is already associated with the organization, an error response is returned")
|
||||||
public Response addIdentityProvider(String id) {
|
public Response addIdentityProvider(String id) {
|
||||||
|
id = id.replaceAll("^\"|\"$", ""); // fixes https://github.com/keycloak/keycloak/issues/34401
|
||||||
|
|
||||||
try {
|
try {
|
||||||
IdentityProviderModel identityProvider = session.identityProviders().getByIdOrAlias(id);
|
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 existing user with the organization. If no user is found, or if it is already associated with the organization, " +
|
||||||
"an error response is returned")
|
"an error response is returned")
|
||||||
public Response addMember(String id) {
|
public Response addMember(String id) {
|
||||||
|
id = id.replaceAll("^\"|\"$", ""); // fixes https://github.com/keycloak/keycloak/issues/34401
|
||||||
|
|
||||||
UserModel user = session.users().getUserById(realm, id);
|
UserModel user = session.users().getUserById(realm, id);
|
||||||
|
|
||||||
if (user == null) {
|
if (user == null) {
|
||||||
|
|
Loading…
Reference in a new issue