]
Brian Stansberry updated WFCORE-1590:
-------------------------------------
Fix Version/s: 3.0.0.Alpha5
(was: 3.0.0.Alpha4)
Default parameter length validating ignores setMinSize(0)
---------------------------------------------------------
Key: WFCORE-1590
URL:
https://issues.jboss.org/browse/WFCORE-1590
Project: WildFly Core
Issue Type: Bug
Components: Domain Management
Affects Versions: 3.0.0.Alpha1
Reporter: Darran Lofthouse
Assignee: Brian Stansberry
Labels: affects_elytron
Fix For: 3.0.0.Alpha5
With the following attribute definition: -
{code:java}
static final SimpleAttributeDefinition REPLACEMENT = new
SimpleAttributeDefinitionBuilder(ElytronDescriptionConstants.REPLACEMENT,
ModelType.STRING, false)
.setAllowExpression(true)
.setMinSize(0)
.setFlags(AttributeAccess.Flag.RESTART_RESOURCE_SERVICES)
.build();
{code}
The following error is reported if an empty string is used as a parameter: -
{noformat}
[standalone@localhost:9990 /]
./subsystem=elytron/regex-name-rewriter=strip-realm:add(pattern="@ELYTRON.ORG",
replacement="", replace-all=true)
{
"outcome" => "failed",
"failure-description" => "WFLYCTL0113: '' is an invalid
value for parameter replacement. Values must have a minimum length of 1 characters",
"rolled-back" => true
}
{noformat}