Skip to content

Commit f62952a

Browse files
authored
Merge pull request #32482 from appsmithorg/release
08/04 Daily Promotion
2 parents 4b2554a + 08ef7ad commit f62952a

File tree

5 files changed

+28
-26
lines changed

5 files changed

+28
-26
lines changed

.github/workflows/caddy-routes-test.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
name: Caddy routes test
1+
name: Caddy route tests
22

33
on:
44
workflow_dispatch:
5+
schedule:
6+
- cron: "0 0 * * MON"
57

68
jobs:
79
build:

.github/workflows/test-build-docker-image.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Test, build and push Docker Image
22

33
run-name: >
4-
${{ github.workflow }} with TED:${{ inputs.ted_tag }}
4+
${{ github.workflow }} with TED:${{ inputs.ted_tag || 'latest' }}
55
66
on:
77
# This workflow will run everyday at 7:00AM, 1:00PM IST on weekdays

app/client/src/sagas/ActionExecution/PluginActionSaga.ts

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1213,15 +1213,7 @@ function* executePageLoadAction(
12131213
data: payload,
12141214
}),
12151215
);
1216-
yield put(
1217-
updateActionData([
1218-
{
1219-
entityName: action.name,
1220-
dataPath: "data",
1221-
data: payload.body,
1222-
},
1223-
]),
1224-
);
1216+
12251217
PerformanceTracker.stopAsyncTracking(
12261218
PerformanceTransactionName.EXECUTE_ACTION,
12271219
{
@@ -1276,15 +1268,7 @@ function* executePageLoadAction(
12761268
undefined,
12771269
pageAction.id,
12781270
);
1279-
yield put(
1280-
updateActionData([
1281-
{
1282-
entityName: action.name,
1283-
dataPath: "data",
1284-
data: payload.body,
1285-
},
1286-
]),
1287-
);
1271+
12881272
yield take(ReduxActionTypes.SET_EVALUATED_TREE);
12891273
}
12901274
}

app/server/appsmith-plugins/mongoPlugin/src/main/java/com/external/plugins/utils/DatasourceUtils.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import com.appsmith.external.models.Property;
1010
import com.appsmith.external.models.SSLDetails;
1111
import com.external.plugins.exceptions.MongoPluginErrorMessages;
12+
import org.springframework.util.LinkedCaseInsensitiveMap;
1213
import org.springframework.util.StringUtils;
1314

1415
import java.util.ArrayList;
@@ -131,23 +132,23 @@ public static String buildURIFromExtractedInfo(Map extractedInfo, String passwor
131132
}
132133

133134
private static String buildURITail(String tailInfo) {
134-
Map<String, String> optionsMap = new HashMap<>();
135-
135+
// case-insensitive match and preserves order of keys, hence the params ordering in the url remains unchanged
136+
Map<String, String> optionsMap = new LinkedCaseInsensitiveMap<>();
136137
for (final String part : tailInfo.split("[&;]")) {
137138
if (part.isEmpty()) {
138139
continue;
139140
}
140141
int idx = part.indexOf('=');
141142
if (idx >= 0) {
142-
String key = part.substring(0, idx).toLowerCase();
143+
String key = part.substring(0, idx);
143144
String value = part.substring(idx + 1);
144145
optionsMap.put(key, value);
145146
} else {
146-
optionsMap.put(part.toLowerCase(), "");
147+
optionsMap.put(part, "");
147148
}
148149
}
149150
optionsMap.putIfAbsent("authsource", "admin");
150-
optionsMap.put("minpoolsize", "0");
151+
optionsMap.putIfAbsent("minpoolsize", "0");
151152
return optionsMap.entrySet().stream()
152153
.map(entry -> {
153154
if (StringUtils.hasLength(entry.getValue())) {

app/server/appsmith-plugins/mongoPlugin/src/test/java/com/external/plugins/utils/DatasourceUtilsTest.java

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,22 @@ public void testBuildClientURI_withoutUserInfoAndAuthSource() {
4545
public void testBuildClientURI_withUserInfoAndAuthSource() {
4646

4747
final String testUri = "mongodb://user:pass@host:port/db?param&authSource=notAdmin";
48-
final String resultUri = "mongodb://user:newPass@host:port/db?param&authsource=notAdmin&minpoolsize=0";
48+
final String resultUri = "mongodb://user:newPass@host:port/db?param&authSource=notAdmin&minpoolsize=0";
49+
50+
DatasourceConfiguration datasourceConfiguration = new DatasourceConfiguration();
51+
final DBAuth dbAuth = new DBAuth();
52+
dbAuth.setPassword("newPass");
53+
datasourceConfiguration.setAuthentication(dbAuth);
54+
datasourceConfiguration.setProperties(List.of(new Property("0", "Yes"), new Property("1", testUri)));
55+
final String clientURI = buildClientURI(datasourceConfiguration);
56+
assertEquals(resultUri, clientURI);
57+
}
58+
59+
@Test
60+
public void testBuildClientURI_withUpperCaseCharacters_CaseRemainsUnchanged() {
61+
62+
final String testUri = "mongodb://user:pass@host:port/db?Param&authSource=notAdmin";
63+
final String resultUri = "mongodb://user:newPass@host:port/db?Param&authSource=notAdmin&minpoolsize=0";
4964

5065
DatasourceConfiguration datasourceConfiguration = new DatasourceConfiguration();
5166
final DBAuth dbAuth = new DBAuth();

0 commit comments

Comments
 (0)