Skip to content

Commit 6ff718f

Browse files
authored
fix(orm): length check added before accessing CustomObjectAttribute values (#2505)
* fix(config-api): removing CB and MySqlDB endpoints * fix(config-api): removing CB and MySqlDB endpoints * fix(orm): length check added before accessing CustomObjectAttribute values
1 parent aad0460 commit 6ff718f

File tree

3 files changed

+41
-19
lines changed

3 files changed

+41
-19
lines changed

jans-config-api/docs/jans-config-api-swagger-auto.yaml

+32-14
Original file line numberDiff line numberDiff line change
@@ -2945,19 +2945,19 @@ components:
29452945
$ref: '#/components/schemas/AttributeValidation'
29462946
tooltip:
29472947
type: string
2948-
whitePagesCanView:
2948+
adminCanAccess:
29492949
type: boolean
2950-
userCanAccess:
2950+
adminCanView:
29512951
type: boolean
2952-
userCanView:
2952+
adminCanEdit:
29532953
type: boolean
2954-
adminCanAccess:
2954+
userCanAccess:
29552955
type: boolean
2956-
adminCanView:
2956+
userCanView:
29572957
type: boolean
29582958
userCanEdit:
29592959
type: boolean
2960-
adminCanEdit:
2960+
whitePagesCanView:
29612961
type: boolean
29622962
baseDn:
29632963
type: string
@@ -3386,24 +3386,24 @@ components:
33863386
type: array
33873387
items:
33883388
type: string
3389-
displayValue:
3390-
type: string
33913389
value:
33923390
type: string
3391+
displayValue:
3392+
type: string
33933393
LocalizedString:
33943394
type: object
33953395
properties:
33963396
values:
33973397
type: object
33983398
additionalProperties:
33993399
type: string
3400+
value:
3401+
type: string
34003402
languageTags:
34013403
uniqueItems: true
34023404
type: array
34033405
items:
34043406
type: string
3405-
value:
3406-
type: string
34073407
AppConfiguration:
34083408
type: object
34093409
properties:
@@ -4088,6 +4088,8 @@ components:
40884088
type: string
40894089
agamaConfiguration:
40904090
$ref: '#/components/schemas/EngineConfig'
4091+
ssaConfiguration:
4092+
$ref: '#/components/schemas/SsaConfiguration'
40914093
enabledFeatureFlags:
40924094
uniqueItems: true
40934095
type: array
@@ -4114,6 +4116,9 @@ components:
41144116
- METRIC
41154117
- STAT
41164118
- PAR
4119+
- SSA
4120+
fapi:
4121+
type: boolean
41174122
allResponseTypesSupported:
41184123
uniqueItems: true
41194124
type: array
@@ -4123,8 +4128,6 @@ components:
41234128
- code
41244129
- token
41254130
- id_token
4126-
fapi:
4127-
type: boolean
41284131
AuthenticationFilter:
41294132
required:
41304133
- baseDn
@@ -4264,6 +4267,20 @@ components:
42644267
type: object
42654268
additionalProperties:
42664269
type: string
4270+
SsaConfiguration:
4271+
type: object
4272+
properties:
4273+
ssaEndpoint:
4274+
type: string
4275+
ssaCustomAttributes:
4276+
type: array
4277+
items:
4278+
type: string
4279+
ssaSigningAlg:
4280+
type: string
4281+
ssaExpirationInDays:
4282+
type: integer
4283+
format: int32
42674284
PersistenceConfiguration:
42684285
type: object
42694286
properties:
@@ -4339,6 +4356,7 @@ components:
43394356
- discovery
43404357
- update_token
43414358
- config_api_auth
4359+
- modify_ssa_response
43424360
programmingLanguage:
43434361
type: string
43444362
enum:
@@ -4749,10 +4767,10 @@ components:
47494767
type: array
47504768
items:
47514769
type: object
4752-
displayValue:
4753-
type: string
47544770
value:
47554771
type: object
4772+
displayValue:
4773+
type: string
47564774
SessionId:
47574775
type: object
47584776
properties:

jans-config-api/plugins/docs/user-mgt-plugin-swagger.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -225,10 +225,10 @@ components:
225225
type: array
226226
items:
227227
type: object
228-
displayValue:
229-
type: string
230228
value:
231229
type: object
230+
displayValue:
231+
type: string
232232
CustomUser:
233233
type: object
234234
properties:

jans-orm/model/src/main/java/io/jans/orm/model/base/CustomObjectAttribute.java

+7-3
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,13 @@ public String getDisplayValue() {
9292
return values.get(0).toString();
9393
}
9494

95-
StringBuilder sb = new StringBuilder(values.get(0).toString());
96-
for (int i = 1; i < values.size(); i++) {
97-
sb.append(", ").append(values.get(i).toString());
95+
StringBuilder sb = new StringBuilder();
96+
for (int i = 0; i < values.size(); i++) {
97+
if(i==0) {
98+
sb.append(values.get(i).toString());
99+
}else {
100+
sb.append(", ").append(values.get(i).toString());
101+
}
98102
}
99103

100104
return sb.toString();

0 commit comments

Comments
 (0)