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

Update JEASY MVEL dependencies to fix security vulnerabilities #655

Draft
wants to merge 16 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion android-json-form-wizard/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ dependencies {
implementation 'org.smartregister:opensrp-client-utils:0.0.6-SNAPSHOT'
implementation 'androidx.test:core:1.4.0'

def easyRulesVersion = '3.4.0'
def easyRulesVersion = '4.1.0'
implementation "org.jeasy:easy-rules-core:$easyRulesVersion"
implementation "org.jeasy:easy-rules-mvel:$easyRulesVersion"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import org.jeasy.rules.annotation.Fact;
import org.jeasy.rules.api.Facts;
import org.json.JSONArray;
import org.json.JSONException;
Expand Down Expand Up @@ -1427,7 +1428,13 @@ private Facts getEntries(String[] address, JSONObject object) throws JSONExcepti
formObject.put(RuleConstant.IS_RULE_CHECK, true);
formObject.put(RuleConstant.STEP, formObject.getString(RuleConstant.STEP));

result.asMap().putAll(getValueFromAddressCore(formObject).asMap());

Facts resultFacts = getValueFromAddressCore(formObject);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

So this fixes an issue where comparison values were not available


for (Map.Entry<String,Object> factEntry: resultFacts.asMap().entrySet()) {
result.put(factEntry.getKey(),factEntry.getValue());
}

}

result.put(RuleConstant.SELECTED_RULE, address[2]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import org.jeasy.rules.api.Rules;
import org.jeasy.rules.mvel.MVELRuleFactory;
import org.jeasy.rules.support.YamlRuleDefinitionReader;
import org.jeasy.rules.support.reader.YamlRuleDefinitionReader;
import org.json.JSONObject;

import java.io.BufferedReader;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

import org.jeasy.rules.api.Rules;
import org.jeasy.rules.mvel.MVELRuleFactory;
import org.jeasy.rules.support.YamlRuleDefinitionReader;
import org.jeasy.rules.support.reader.YamlRuleDefinitionReader;
import org.json.JSONObject;

import java.io.BufferedReader;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
import org.jeasy.rules.api.RuleListener;
import org.jeasy.rules.api.Rules;
import org.jeasy.rules.api.RulesEngine;
import org.jeasy.rules.api.RulesEngineParameters;
import org.jeasy.rules.core.DefaultRulesEngine;
import org.jeasy.rules.core.RulesEngineParameters;
import org.jeasy.rules.mvel.MVELRule;
import org.jeasy.rules.mvel.MVELRuleFactory;
import org.jeasy.rules.support.YamlRuleDefinitionReader;
import org.jeasy.rules.support.reader.YamlRuleDefinitionReader;
import org.json.JSONArray;
import org.json.JSONObject;
import org.smartregister.client.utils.contract.ClientFormContract;
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION_NAME=3.1.1-SNAPSHOT
VERSION_NAME=3.1.2-SNAPSHOT
VERSION_CODE=1
GROUP=org.smartregister
POM_SETTING_DESCRIPTION=OpenSRP Client Native Form Json Wizard
Expand Down