Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(orm): length check added before accessing CustomObjectAttribute values #2505

Merged
merged 5 commits into from
Sep 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 32 additions & 14 deletions jans-config-api/docs/jans-config-api-swagger-auto.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2945,19 +2945,19 @@ components:
$ref: '#/components/schemas/AttributeValidation'
tooltip:
type: string
whitePagesCanView:
adminCanAccess:
type: boolean
userCanAccess:
adminCanView:
type: boolean
userCanView:
adminCanEdit:
type: boolean
adminCanAccess:
userCanAccess:
type: boolean
adminCanView:
userCanView:
type: boolean
userCanEdit:
type: boolean
adminCanEdit:
whitePagesCanView:
type: boolean
baseDn:
type: string
Expand Down Expand Up @@ -3386,24 +3386,24 @@ components:
type: array
items:
type: string
displayValue:
type: string
value:
type: string
displayValue:
type: string
LocalizedString:
type: object
properties:
values:
type: object
additionalProperties:
type: string
value:
type: string
languageTags:
uniqueItems: true
type: array
items:
type: string
value:
type: string
AppConfiguration:
type: object
properties:
Expand Down Expand Up @@ -4088,6 +4088,8 @@ components:
type: string
agamaConfiguration:
$ref: '#/components/schemas/EngineConfig'
ssaConfiguration:
$ref: '#/components/schemas/SsaConfiguration'
enabledFeatureFlags:
uniqueItems: true
type: array
Expand All @@ -4114,6 +4116,9 @@ components:
- METRIC
- STAT
- PAR
- SSA
fapi:
type: boolean
allResponseTypesSupported:
uniqueItems: true
type: array
Expand All @@ -4123,8 +4128,6 @@ components:
- code
- token
- id_token
fapi:
type: boolean
AuthenticationFilter:
required:
- baseDn
Expand Down Expand Up @@ -4264,6 +4267,20 @@ components:
type: object
additionalProperties:
type: string
SsaConfiguration:
type: object
properties:
ssaEndpoint:
type: string
ssaCustomAttributes:
type: array
items:
type: string
ssaSigningAlg:
type: string
ssaExpirationInDays:
type: integer
format: int32
PersistenceConfiguration:
type: object
properties:
Expand Down Expand Up @@ -4339,6 +4356,7 @@ components:
- discovery
- update_token
- config_api_auth
- modify_ssa_response
programmingLanguage:
type: string
enum:
Expand Down Expand Up @@ -4749,10 +4767,10 @@ components:
type: array
items:
type: object
displayValue:
type: string
value:
type: object
displayValue:
type: string
SessionId:
type: object
properties:
Expand Down
4 changes: 2 additions & 2 deletions jans-config-api/plugins/docs/user-mgt-plugin-swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,10 @@ components:
type: array
items:
type: object
displayValue:
type: string
value:
type: object
displayValue:
type: string
CustomUser:
type: object
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,13 @@ public String getDisplayValue() {
return values.get(0).toString();
}

StringBuilder sb = new StringBuilder(values.get(0).toString());
for (int i = 1; i < values.size(); i++) {
sb.append(", ").append(values.get(i).toString());
StringBuilder sb = new StringBuilder();
for (int i = 0; i < values.size(); i++) {
if(i==0) {
sb.append(values.get(i).toString());
}else {
sb.append(", ").append(values.get(i).toString());
}
}

return sb.toString();
Expand Down