[JBoss JIRA] (WFLY-8358) Wrong charset received in HttpServletRequest sent by POST method with JQUERY AJAX
by Mario García García (JIRA)
Mario García García created WFLY-8358:
-----------------------------------------
Summary: Wrong charset received in HttpServletRequest sent by POST method with JQUERY AJAX
Key: WFLY-8358
URL: https://issues.jboss.org/browse/WFLY-8358
Project: WildFly
Issue Type: Bug
Components: Server
Affects Versions: 10.1.0.Final
Environment: Tested in Windows 7 Enterprise and tested in Linux 3.16.6-2-desktop
Reporter: Mario García García
Assignee: Jason Greene
Performing a typical AJAX call with JQUERY ($.ajax function) to a Servlet from a JSP with method POST and sending a parameter that contains a String with latin characters such as 'ó'.
This is the String that is sent into a parameter:
"Código"
No content type specified so JQUERY.AJAX takes the default one (contentType: 'application/x-www-form-urlencoded, charset=UTF-8').
The received parameter in HttpServletRequest (doPost method) is showed like this:
"C??digo".
In Hex this is the content:
43 3f3f 6469676f (spaces added for better reading pourposes)
This is no UTF-8. The proper encoding should be:
43 c3b3 6469676f (spaces added for better reading pourposes)
Wildfly Configuration:
Subsystems Subsystem: Web/HTTP - Undertow Settings: Servlet/JSP
Default encoding: (empty)
Java encoding: UTF8
Subsystems Subsystem: Web/HTTP - Undertow Settings: HTTP
Url charset: UTF-8
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 1 month
[JBoss JIRA] (WFCORE-2531) Validation of cardinality of attribute groups and object type attributes on PersistentResourceXMLDescription
by Pedro Igor (JIRA)
[ https://issues.jboss.org/browse/WFCORE-2531?page=com.atlassian.jira.plugi... ]
Pedro Igor reassigned WFCORE-2531:
----------------------------------
Assignee: Pedro Igor (was: Brian Stansberry)
> Validation of cardinality of attribute groups and object type attributes on PersistentResourceXMLDescription
> ------------------------------------------------------------------------------------------------------------
>
> Key: WFCORE-2531
> URL: https://issues.jboss.org/browse/WFCORE-2531
> Project: WildFly Core
> Issue Type: Bug
> Components: Domain Management
> Affects Versions: 3.0.0.Beta8
> Reporter: Pedro Igor
> Assignee: Pedro Igor
>
> Currently, the {{org.jboss.as.controller.PersistentResourceXMLDescription}} does not perform any validation when using attribute groups or object type attribute definitions to check how many times an attribute was defined.
> For instance, when using a resource description with an attribute group like this:
> {code}
> static final AttributeDefinition clusterAttr1 = create("cluster-attr1", ModelType.STRING)
> .setAttributeGroup("cluster")
> .setXmlName("attr1")
> .build();
> static final AttributeDefinition clusterAttr2 = create("cluster-attr2", ModelType.STRING)
> .setAttributeGroup("cluster")
> .setXmlName("attr2")
> .build();
> {code}
> The parser allows a XML declaration as follows:
> {code}
> <resource name="foo3">
> <cluster attr1="bar1" attr2="baz1"/>
> <cluster attr1="bar2" attr2="baz2"/>
> </resource>
> {code}
> The declaration does not throws any error and only the second declaration of {{cluster}} is populated into the model.
> A similar problem exists when using object type attribute definitions as follows:
> {code}
> static final ObjectTypeAttributeDefinition USERS_PROPERTIES = ObjectTypeAttributeDefinition.Builder.of("user-properties",
> create("path", ModelType.STRING, false)
> .setAllowExpression(false)
> .build(),
> create("relative-to", ModelType.STRING, false)
> .setAllowExpression(false)
> .build())
> .build();
> {code}
> The parser also allows a declaration as follows:
> {code}
> <object-type-test name="foo5">
> <user-properties path="path1" relative-to="relative1"/>
> <user-properties path="path2" relative-to="relative2"/>
> </object-type-test>
> {code}
> As a result, only the last {{user-properties}} is populated in the model and we don't get any error.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 1 month
[JBoss JIRA] (WFCORE-2531) Validation of cardinality of attribute groups and object type attributes on PersistentResourceXMLDescription
by Brian Stansberry (JIRA)
[ https://issues.jboss.org/browse/WFCORE-2531?page=com.atlassian.jira.plugi... ]
Brian Stansberry updated WFCORE-2531:
-------------------------------------
Summary: Validation of cardinality of attribute groups and object type attributes on PersistentResourceXMLDescription (was: Validation of attribute groups and object type attributes on PersistentResourceXMLDescription)
> Validation of cardinality of attribute groups and object type attributes on PersistentResourceXMLDescription
> ------------------------------------------------------------------------------------------------------------
>
> Key: WFCORE-2531
> URL: https://issues.jboss.org/browse/WFCORE-2531
> Project: WildFly Core
> Issue Type: Bug
> Components: Domain Management
> Affects Versions: 3.0.0.Beta8
> Reporter: Pedro Igor
> Assignee: Brian Stansberry
>
> Currently, the {{org.jboss.as.controller.PersistentResourceXMLDescription}} does not perform any validation when using attribute groups or object type attribute definitions to check how many times an attribute was defined.
> For instance, when using a resource description with an attribute group like this:
> {code}
> static final AttributeDefinition clusterAttr1 = create("cluster-attr1", ModelType.STRING)
> .setAttributeGroup("cluster")
> .setXmlName("attr1")
> .build();
> static final AttributeDefinition clusterAttr2 = create("cluster-attr2", ModelType.STRING)
> .setAttributeGroup("cluster")
> .setXmlName("attr2")
> .build();
> {code}
> The parser allows a XML declaration as follows:
> {code}
> <resource name="foo3">
> <cluster attr1="bar1" attr2="baz1"/>
> <cluster attr1="bar2" attr2="baz2"/>
> </resource>
> {code}
> The declaration does not throws any error and only the second declaration of {{cluster}} is populated into the model.
> A similar problem exists when using object type attribute definitions as follows:
> {code}
> static final ObjectTypeAttributeDefinition USERS_PROPERTIES = ObjectTypeAttributeDefinition.Builder.of("user-properties",
> create("path", ModelType.STRING, false)
> .setAllowExpression(false)
> .build(),
> create("relative-to", ModelType.STRING, false)
> .setAllowExpression(false)
> .build())
> .build();
> {code}
> The parser also allows a declaration as follows:
> {code}
> <object-type-test name="foo5">
> <user-properties path="path1" relative-to="relative1"/>
> <user-properties path="path2" relative-to="relative2"/>
> </object-type-test>
> {code}
> As a result, only the last {{user-properties}} is populated in the model and we don't get any error.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 1 month
[JBoss JIRA] (WFCORE-2531) Validation of attribute groups and object type attributes on PersistentResourceXMLDescription
by Pedro Igor (JIRA)
[ https://issues.jboss.org/browse/WFCORE-2531?page=com.atlassian.jira.plugi... ]
Pedro Igor updated WFCORE-2531:
-------------------------------
Description:
Currently, the {{org.jboss.as.controller.PersistentResourceXMLDescription}} does not perform any validation when using attribute groups or object type attribute definitions to check how many times an attribute was defined.
For instance, when using a resource description with an attribute group like this:
{code}
static final AttributeDefinition clusterAttr1 = create("cluster-attr1", ModelType.STRING)
.setAttributeGroup("cluster")
.setXmlName("attr1")
.build();
static final AttributeDefinition clusterAttr2 = create("cluster-attr2", ModelType.STRING)
.setAttributeGroup("cluster")
.setXmlName("attr2")
.build();
{code}
The parser allows a XML declaration as follows:
{code}
<resource name="foo3">
<cluster attr1="bar1" attr2="baz1"/>
<cluster attr1="bar2" attr2="baz2"/>
</resource>
{code}
The declaration does not throws any error and only the second declaration of {{cluster}} is populated into the model.
A similar problem exists when using object type attribute definitions as follows:
{code}
static final ObjectTypeAttributeDefinition USERS_PROPERTIES = ObjectTypeAttributeDefinition.Builder.of("user-properties",
create("path", ModelType.STRING, false)
.setAllowExpression(false)
.build(),
create("relative-to", ModelType.STRING, false)
.setAllowExpression(false)
.build())
.build();
{code}
The parser also allows a declaration as follows:
{code}
<object-type-test name="foo5">
<user-properties path="path1" relative-to="relative1"/>
<user-properties path="path2" relative-to="relative2"/>
</object-type-test>
{code}
As a result, only the last {{user-properties}} is populated in the model and we don't get any error.
was:Currently, the
> Validation of attribute groups and object type attributes on PersistentResourceXMLDescription
> ---------------------------------------------------------------------------------------------
>
> Key: WFCORE-2531
> URL: https://issues.jboss.org/browse/WFCORE-2531
> Project: WildFly Core
> Issue Type: Bug
> Components: Domain Management
> Affects Versions: 3.0.0.Beta8
> Reporter: Pedro Igor
> Assignee: Brian Stansberry
>
> Currently, the {{org.jboss.as.controller.PersistentResourceXMLDescription}} does not perform any validation when using attribute groups or object type attribute definitions to check how many times an attribute was defined.
> For instance, when using a resource description with an attribute group like this:
> {code}
> static final AttributeDefinition clusterAttr1 = create("cluster-attr1", ModelType.STRING)
> .setAttributeGroup("cluster")
> .setXmlName("attr1")
> .build();
> static final AttributeDefinition clusterAttr2 = create("cluster-attr2", ModelType.STRING)
> .setAttributeGroup("cluster")
> .setXmlName("attr2")
> .build();
> {code}
> The parser allows a XML declaration as follows:
> {code}
> <resource name="foo3">
> <cluster attr1="bar1" attr2="baz1"/>
> <cluster attr1="bar2" attr2="baz2"/>
> </resource>
> {code}
> The declaration does not throws any error and only the second declaration of {{cluster}} is populated into the model.
> A similar problem exists when using object type attribute definitions as follows:
> {code}
> static final ObjectTypeAttributeDefinition USERS_PROPERTIES = ObjectTypeAttributeDefinition.Builder.of("user-properties",
> create("path", ModelType.STRING, false)
> .setAllowExpression(false)
> .build(),
> create("relative-to", ModelType.STRING, false)
> .setAllowExpression(false)
> .build())
> .build();
> {code}
> The parser also allows a declaration as follows:
> {code}
> <object-type-test name="foo5">
> <user-properties path="path1" relative-to="relative1"/>
> <user-properties path="path2" relative-to="relative2"/>
> </object-type-test>
> {code}
> As a result, only the last {{user-properties}} is populated in the model and we don't get any error.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years, 1 month