-
Bug
-
Resolution: Done
-
Major
-
None
The CLI is incorrectly parsing commands where the parameter contains a list that contains a list.
Take the following command: -
./subsystem=elytron/provider-loader=pkcs#11:add(register=false, providers=[{ class-names=[sun.security.pkcs11.SunPKCS11], module=sun.jdk, property-list=[{key=a,value=b},{key=b,value=c}] }])
The following operation is created: -
{
"address" => [
("subsystem" => "elytron"),
("provider-loader" => "pkcs#11")
],
"operation" => "add",
"register" => false,
"providers" => [{
"class-names" => ["sun.security.pkcs11.SunPKCS11"],
"module" => "sun.jdk",
"property-list" => [
{
"key" => "a",
"value" => "b"
},
{
"key" => "b",
"value" => "c"
},
"}"
]
}]
}
Note the additional "}" inside property-list.
Change the order of parameters to now be: -
./subsystem=elytron/provider-loader=pkcs#11:add(register=false, providers=[{ class-names=[sun.security.pkcs11.SunPKCS11], property-list=[{key=a,value=b},{key=b,value=c}], module=sun.jdk }])
And the resulting operation is: -
{
"address" => [
("subsystem" => "elytron"),
("provider-loader" => "pkcs#11")
],
"operation" => "add",
"register" => false,
"providers" => [
{
"key" => "a",
"value" => "b"
},
{
"key" => "b",
"value" => "c"
},
("module" => "sun.jdk }")
]
}
Here the content of providers is completely wrong, also the value for 'module' is wrong and contains an additional '}'.