Skip to content

vunerability upgrade PR#917

Open
junaidwarsivd wants to merge 11 commits intomasterfrom
vunerability-upgrades
Open

vunerability upgrade PR#917
junaidwarsivd wants to merge 11 commits intomasterfrom
vunerability-upgrades

Conversation

@junaidwarsivd
Copy link
Copy Markdown
Contributor

No description provided.

Comment thread opensrp-anc/build.gradle Outdated
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
Copy Markdown
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 - nek.eam@gmail.com on 22-11-2022.
*/
public class YamlRuleDefinitionReaderExt extends YamlRuleDefinitionReader {
Copy link
Copy Markdown
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

}

@Override
public void beforeExecute(Rule rule, Facts facts) {
Copy link
Copy Markdown
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
Copy Markdown
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