Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vunerability upgrade PR #917

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

vunerability upgrade PR #917

wants to merge 11 commits into from

Conversation

junaidwarsivd
Copy link
Contributor

No description provided.

Comment on lines 256 to 257
implementation 'org.jeasy:easy-rules-core:3.4.0'
implementation 'org.jeasy:easy-rules-mvel:3.4.0'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bonfaceshisakha pointed out that this needs to be version 4.0.0

junaidwarsivd and others added 3 commits November 8, 2022 12:49
- Update jackson-dataformat-yaml to 2.14.0 to fix security vulnerabilities
- Update native-form to fix MVEL rules not working for some forms such as registration forms
/**
* Created by Ephraim Kigamba - [email protected] on 22-11-2022.
*/
public class YamlRuleDefinitionReaderExt extends YamlRuleDefinitionReader {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be removed and we can use the one on native form

@@ -45,4 +49,36 @@ protected Facts initializeFacts(Facts facts) {
public boolean beforeEvaluate(Rule rule, Facts facts) {
return selectedRuleName != null && selectedRuleName.equals(rule.getName());
}

@Override
public void beforeExecute(Rule rule, Facts facts) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can possibly remove this and use what is on native form

Comment on lines 58 to 84
private final YamlRuleDefinitionReaderExt yamlRuleDefinitionReader = new YamlRuleDefinitionReaderExt();
private final MVELRuleFactory mvelRuleFactory = new MVELRuleFactory(yamlRuleDefinitionReader);

public AncRulesEngineHelper(Context context) {
this.context = context;
this.inferentialRulesEngine = new InferenceRulesEngine();
RulesEngineParameters parameters = new RulesEngineParameters().skipOnFirstAppliedRule(true);
this.defaultRulesEngine = new DefaultRulesEngine(parameters);
/* ((DefaultRulesEngine) this.defaultRulesEngine).registerRuleListener(new RuleListener() {
@Override
public void beforeExecute(Rule rule, Facts facts) {
Timber.e("Putting facts in beforeExecute");
facts.put("facts", facts);
}

@Override
public void onSuccess(Rule rule, Facts facts) {
Timber.e("Putting facts in onSuccess");
facts.remove("facts");
}

@Override
public void onFailure(Rule rule, Facts facts, Exception exception) {
Timber.e("Putting facts in onFailure");
facts.remove("facts");
}
});*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can discard these changes

…showing the overview and previous contacts in the contacts sections
…showing the overview and previous contacts in the contacts sections
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants