[JBoss JIRA] (DROOLS-5234) I use jsonString as the parameter of the function and i get a error:Syntax error on tokens, delete these tokens
by xin zhang (Jira)
[ https://issues.redhat.com/browse/DROOLS-5234?page=com.atlassian.jira.plug... ]
xin zhang closed DROOLS-5234.
-----------------------------
Resolution: Won't Do
> I use jsonString as the parameter of the function and i get a error:Syntax error on tokens, delete these tokens
> ---------------------------------------------------------------------------------------------------------------
>
> Key: DROOLS-5234
> URL: https://issues.redhat.com/browse/DROOLS-5234
> Project: Drools
> Issue Type: Bug
> Components: build
> Affects Versions: 7.22.0.Final
> Reporter: xin zhang
> Assignee: Ant Stephenson
> Priority: Major
>
> version : `7.22.0.Final`
> - this is my rule:
> ```
> package org.zhangnix.droolsdemo;
> import org.zhangnix.droolsdemo.model.DroolsContext;
> import com.alibaba.fastjson.JSON;
> import com.alibaba.fastjson.JSONObject;
> import java.math.BigDecimal;
> import java.util.List;
> import java.util.Date;
> import java.lang.Boolean;
> import java.lang.String;
> import java.lang.Integer;
> function boolean checkGoodsCount(Integer currentGoodsCount,String jsonString) {
> JSONObject context = JSON.parseObject(jsonString);
> int goodsCount = context.getInteger("goodsCount");
> String compareType = context.getString("compareType");
> switch (compareType) {
> case "M":
> return currentGoodsCount > goodsCount;
> case "E":
> return currentGoodsCount == goodsCount;
> case "EM":
> return currentGoodsCount >= goodsCount;
> default:
> return false;
> }
> }
> rule "Activity conditions"
> when
> $droolsContext:DroolsContext();
> eval(checkGoodsCount($droolsContext.getCurrentGoodsCount(),'{"compareType":"EM","goodsCount":3}'));
> then
> end
> ```
> I use jsonString as the parameter of the function and i get a error:
> > Syntax error on tokens, delete these tokens
> this is my generate java file:
> ```
> public static boolean eval0( org.zhangnix.droolsdemo.model.DroolsContext $droolsContext
> ) throws java.lang.Exception {
> Boolean $eval$result$ = ( checkGoodsCount($droolsContext.getCurrentGoodsCount(),"{"compareType":"EM","goodsCount":3}") );
> return $eval$result$ == null ? false : $eval$result$.booleanValue();
> }
> ```
> When parsing jsonString, there is no backslash (\\) before the quotes. Please tell me what should I do to pass jsonString correctly.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 1 month
[JBoss JIRA] (WFCORE-1313) User with slash or backslash char in LDAP name cannot log in through security-realm
by Lin Gao (Jira)
[ https://issues.redhat.com/browse/WFCORE-1313?page=com.atlassian.jira.plug... ]
Lin Gao updated WFCORE-1313:
----------------------------
Labels: downstream_dependency (was: )
> User with slash or backslash char in LDAP name cannot log in through security-realm
> -----------------------------------------------------------------------------------
>
> Key: WFCORE-1313
> URL: https://issues.redhat.com/browse/WFCORE-1313
> Project: WildFly Core
> Issue Type: Bug
> Components: Security
> Reporter: Hynek Švábek
> Assignee: Lin Gao
> Priority: Minor
> Labels: downstream_dependency
> Attachments: users.ldif
>
>
> According to LDAP specification [1], DN can contain slash char without escaping or escaped backslash, etc.
> I am not able to log in to management console with username "Slash/Char" or "Back\Slash". But I would be able to log in there.
> I can see this in Wireshark
> *Slash/Char*
> {code}
> LDAPMessage bindRequest(1) ""uid=Slash/Char",ou=People,o=LdapRealmSpecialNameManualTest7d339efa,o=primary,dc=jboss,dc=org" simple
> LDAPMessage bindResponse(1) invalidDNSyntax (Incorrect DN given : "uid=Slash/Char",ou=People,o=LdapRealmSpecialNameManualTest7d339efa,o=primary,dc=jboss,dc=org (0x22 0x75 0x69 0x64 0x3D 0x53 0x6C 0x61 0x73 0x68 0x2F 0x43 0x68 0x61 0x72 0x2
> {code}
> You can see there quotation marks around *uid=Slash/Char*.
> *Back\Slash*
> {code}
> LDAPMessage bindRequest(1) "uid=Back\\\Slash,ou=People,o=LdapRealmSpecialNameManualTest7d339efa,o=primary,dc=jboss,dc=org" simple
> LDAPMessage bindResponse(1) invalidDNSyntax (Incorrect DN given : uid=Back\\\Slash,ou=People,o=LdapRealmSpecialNameManualTest7d339efa,o=primary,dc=jboss,dc=org (0x75 0x69 0x64 0x3D 0x42 0x61 0x63 0x6B 0x5C 0x5C 0x5C 0x53 0x6C 0x61 0x73 0x6
> {code}
> You can see there three backslash chars.
> In my opinion problem can be somewhere around this
> {code}
> javax.naming.NameImpl.stringifyComp(String comp)
> {code}
> [1] https://tools.ietf.org/html/rfc2253#section-3
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 1 month
[JBoss JIRA] (WFCORE-1313) User with slash or backslash char in LDAP name cannot log in through security-realm
by Lin Gao (Jira)
[ https://issues.redhat.com/browse/WFCORE-1313?page=com.atlassian.jira.plug... ]
Lin Gao updated WFCORE-1313:
----------------------------
Fix Version/s: (was: 3.0.0.Alpha13)
> User with slash or backslash char in LDAP name cannot log in through security-realm
> -----------------------------------------------------------------------------------
>
> Key: WFCORE-1313
> URL: https://issues.redhat.com/browse/WFCORE-1313
> Project: WildFly Core
> Issue Type: Bug
> Components: Security
> Reporter: Hynek Švábek
> Assignee: Lin Gao
> Priority: Minor
> Attachments: users.ldif
>
>
> According to LDAP specification [1], DN can contain slash char without escaping or escaped backslash, etc.
> I am not able to log in to management console with username "Slash/Char" or "Back\Slash". But I would be able to log in there.
> I can see this in Wireshark
> *Slash/Char*
> {code}
> LDAPMessage bindRequest(1) ""uid=Slash/Char",ou=People,o=LdapRealmSpecialNameManualTest7d339efa,o=primary,dc=jboss,dc=org" simple
> LDAPMessage bindResponse(1) invalidDNSyntax (Incorrect DN given : "uid=Slash/Char",ou=People,o=LdapRealmSpecialNameManualTest7d339efa,o=primary,dc=jboss,dc=org (0x22 0x75 0x69 0x64 0x3D 0x53 0x6C 0x61 0x73 0x68 0x2F 0x43 0x68 0x61 0x72 0x2
> {code}
> You can see there quotation marks around *uid=Slash/Char*.
> *Back\Slash*
> {code}
> LDAPMessage bindRequest(1) "uid=Back\\\Slash,ou=People,o=LdapRealmSpecialNameManualTest7d339efa,o=primary,dc=jboss,dc=org" simple
> LDAPMessage bindResponse(1) invalidDNSyntax (Incorrect DN given : uid=Back\\\Slash,ou=People,o=LdapRealmSpecialNameManualTest7d339efa,o=primary,dc=jboss,dc=org (0x75 0x69 0x64 0x3D 0x42 0x61 0x63 0x6B 0x5C 0x5C 0x5C 0x53 0x6C 0x61 0x73 0x6
> {code}
> You can see there three backslash chars.
> In my opinion problem can be somewhere around this
> {code}
> javax.naming.NameImpl.stringifyComp(String comp)
> {code}
> [1] https://tools.ietf.org/html/rfc2253#section-3
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 1 month
[JBoss JIRA] (WFCORE-1313) User with slash or backslash char in LDAP name cannot log in through security-realm
by Lin Gao (Jira)
[ https://issues.redhat.com/browse/WFCORE-1313?page=com.atlassian.jira.plug... ]
Lin Gao reopened WFCORE-1313:
-----------------------------
Reopen it because it still reproduced in latest wildfly master
> User with slash or backslash char in LDAP name cannot log in through security-realm
> -----------------------------------------------------------------------------------
>
> Key: WFCORE-1313
> URL: https://issues.redhat.com/browse/WFCORE-1313
> Project: WildFly Core
> Issue Type: Bug
> Components: Security
> Reporter: Hynek Švábek
> Assignee: Lin Gao
> Priority: Minor
> Attachments: users.ldif
>
>
> According to LDAP specification [1], DN can contain slash char without escaping or escaped backslash, etc.
> I am not able to log in to management console with username "Slash/Char" or "Back\Slash". But I would be able to log in there.
> I can see this in Wireshark
> *Slash/Char*
> {code}
> LDAPMessage bindRequest(1) ""uid=Slash/Char",ou=People,o=LdapRealmSpecialNameManualTest7d339efa,o=primary,dc=jboss,dc=org" simple
> LDAPMessage bindResponse(1) invalidDNSyntax (Incorrect DN given : "uid=Slash/Char",ou=People,o=LdapRealmSpecialNameManualTest7d339efa,o=primary,dc=jboss,dc=org (0x22 0x75 0x69 0x64 0x3D 0x53 0x6C 0x61 0x73 0x68 0x2F 0x43 0x68 0x61 0x72 0x2
> {code}
> You can see there quotation marks around *uid=Slash/Char*.
> *Back\Slash*
> {code}
> LDAPMessage bindRequest(1) "uid=Back\\\Slash,ou=People,o=LdapRealmSpecialNameManualTest7d339efa,o=primary,dc=jboss,dc=org" simple
> LDAPMessage bindResponse(1) invalidDNSyntax (Incorrect DN given : uid=Back\\\Slash,ou=People,o=LdapRealmSpecialNameManualTest7d339efa,o=primary,dc=jboss,dc=org (0x75 0x69 0x64 0x3D 0x42 0x61 0x63 0x6B 0x5C 0x5C 0x5C 0x53 0x6C 0x61 0x73 0x6
> {code}
> You can see there three backslash chars.
> In my opinion problem can be somewhere around this
> {code}
> javax.naming.NameImpl.stringifyComp(String comp)
> {code}
> [1] https://tools.ietf.org/html/rfc2253#section-3
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 1 month
[JBoss JIRA] (WFLY-12684) Avoid NPE when reading Artemis cluster status while Artemis broker isn't fully started
by Ranabir Chakraborty (Jira)
[ https://issues.redhat.com/browse/WFLY-12684?page=com.atlassian.jira.plugi... ]
Ranabir Chakraborty commented on WFLY-12684:
--------------------------------------------
[~ehugonnet] Can you please provide the steps to recreate this issue?
> Avoid NPE when reading Artemis cluster status while Artemis broker isn't fully started
> ---------------------------------------------------------------------------------------
>
> Key: WFLY-12684
> URL: https://issues.redhat.com/browse/WFLY-12684
> Project: WildFly
> Issue Type: Bug
> Components: JMS
> Affects Versions: 18.0.0.Final
> Reporter: Emmanuel Hugonnet
> Assignee: Emmanuel Hugonnet
> Priority: Major
>
> 11:00:36,718 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 1) WFLYCTL0013: Operation ("read-attribute") failed - address: ([
> ("subsystem" => "messaging-activemq"),
> ("server" => "default"),
> ("ha-policy" => "replication-slave")
> ]): java.lang.NullPointerException
> at org.wildfly.extension.messaging-activemq//org.wildfly.extension.messaging.activemq.ha.HAPolicySynchronizationStatusReadHandler.executeRuntimeStep(HAPolicySynchronizationStatusReadHandler.java:61)
> at org.jboss.as.controller@10.0.0.Final//org.jboss.as.controller.AbstractRuntimeOnlyHandler$1.execute(AbstractRuntimeOnlyHandler.java:59)
> at org.jboss.as.controller@10.0.0.Final//org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:999)
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 1 month
[JBoss JIRA] (WFLY-13221) Remove package-schema cruft from wildfly-feature-pack-build.xml files
by Brian Stansberry (Jira)
[ https://issues.redhat.com/browse/WFLY-13221?page=com.atlassian.jira.plugi... ]
Brian Stansberry commented on WFLY-13221:
-----------------------------------------
[~yersan] I don't recall the history behind this and may not have been involved. But I suspect that before the legacy feature packs were introduced we had hand coded the schemas that got included, which meant a manual decision-making process. And then the legacy feature packs encoded the same result.
We ship a lot of libraries some of which may include schemas that are irrelevant to WildFly. It's a valid discussion whether to filter them out. Not super urgent though. :). But a discussion would need to have some data, i.e. what would be included that isn't already.
> Remove package-schema cruft from wildfly-feature-pack-build.xml files
> ---------------------------------------------------------------------
>
> Key: WFLY-13221
> URL: https://issues.redhat.com/browse/WFLY-13221
> Project: WildFly
> Issue Type: Task
> Components: Build System
> Reporter: Brian Stansberry
> Assignee: Yeray Borges Santana
> Priority: Minor
>
> The various wildfly-feature-pack-build.xml files include 'package-schemas' elements. AIUI the children of those elements only need to refer to maven groupId for which that specific feature pack provides artifacts with schemas. It does not need to include groupIds for artifacts from other f-ps that the f-p depends on. The WF galleon plugin itself combines those.
> So the task is
> 1) to clean out cruft, i.e. elements that are related to artifacts from other feature packs. Helps clarify the expected use of these files.
> 2) Perhaps in the verifier tests for servlet-dist, ee-dist, dist add verification of the presence of 1 schema from each relevant maven groupId. Guard against schemas suddenly not getting picked up.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 1 month
[JBoss JIRA] (DROOLS-5229) DMNValidate mojo fails XMLSchema validation with included models
by Guilherme Gomes (Jira)
[ https://issues.redhat.com/browse/DROOLS-5229?page=com.atlassian.jira.plug... ]
Guilherme Gomes updated DROOLS-5229:
------------------------------------
Story Points: 5
> DMNValidate mojo fails XMLSchema validation with included models
> ----------------------------------------------------------------
>
> Key: DROOLS-5229
> URL: https://issues.redhat.com/browse/DROOLS-5229
> Project: Drools
> Issue Type: Bug
> Affects Versions: 7.34.0.Final
> Reporter: Tracy Hires
> Assignee: Guilherme Gomes
> Priority: Major
> Attachments: ValidateDMN Mojo Failure.png, xml_validation_error.zip
>
>
> The attached DMN decision project was built using Business Central 7.34.0.Final. In this project, the dmn model `Math Functions.dmn` invokes business knowledge model `Quotient` from dmn model `Divide.dmn`. Invoking the ValidateDMN mojo (enabled by default) from the kie-maven-plugin fails XML Validation. One can get past this error by disabling DMNValidation with the following configuration in the pom (though disabling DMNValidation for an XML Schema validation also prevents finding FEEL parser errors):
> ```
> <build>
> <plugins>
> <plugin>
> <groupId>org.kie</groupId>
> <artifactId>kie-maven-plugin</artifactId>
> <version>7.34.0.Final</version>
> <extensions>true</extensions>
> <!-- Can get past xml validation error by disabling the ValidateDMN Mojo -->
> <configuration>
> <validateDMN>disabled</validateDMN>
> </configuration>
> </plugin>
> </plugins>
> </build>
> ```
> When one combines the two dmn models into a single model, the XML Validation succeeds (this example is not supplied, but is trivial to re-build).
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 1 month
[JBoss JIRA] (WFCORE-4918) Optimize MMR logic within DiscardAttributeChecker.DEFAULT
by Paul Ferraro (Jira)
Paul Ferraro created WFCORE-4918:
------------------------------------
Summary: Optimize MMR logic within DiscardAttributeChecker.DEFAULT
Key: WFCORE-4918
URL: https://issues.redhat.com/browse/WFCORE-4918
Project: WildFly Core
Issue Type: Task
Components: Management
Affects Versions: 12.0.0.Beta1
Reporter: Paul Ferraro
Assignee: Paul Ferraro
See:
https://github.com/wildfly/wildfly-core/blob/master/controller/src/main/j...
https://github.com/wildfly/wildfly-core/blob/master/controller/src/main/j...
Basically, in order to deal with the possibility of override registrations, calls to an MRR typically result in it internally working up to the root of the MRR tree and then walking back down to the target address. So this:
{code:java}
ImmutableManagementResourceRegistration registration = context.getResourceRegistrationFromRoot(address);
AttributeDefinition definition = registration.getAttributeAccess(PathAddress.EMPTY_ADDRESS, attributeName).getAttributeDefinition();
{code}
is less efficient than:
{code:java}
ImmutableManagementResourceRegistration registration = context.getResourceRegistrationFromRoot(PathAddress.EMPTY_ADDRESS);
AttributeDefinition definition = registration.getAttributeAccess(address, attributeName).getAttributeDefinition();
{code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 1 month