@akinon/next 1.92.0-rc.23 → 1.92.0-rc.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @akinon/next
2
2
 
3
+ ## 1.92.0-rc.25
4
+
5
+ ### Minor Changes
6
+
7
+ - 485e8ef: ZERO-3422: Refactor parameter handling in wallet complete redirection middleware to use forEach
8
+
9
+ ## 1.92.0-rc.24
10
+
11
+ ### Minor Changes
12
+
13
+ - fee608d: ZERO-3422: Refactor body handling in wallet complete redirection middleware
14
+
3
15
  ## 1.92.0-rc.23
4
16
 
5
17
  ### Minor Changes
@@ -49,7 +49,31 @@ const withWalletCompleteRedirection =
49
49
  };
50
50
 
51
51
  try {
52
- const body = await streamToString(req.body);
52
+ const existingBody = await streamToString(req.body);
53
+ const queryParams = new URLSearchParams(url.search);
54
+ const bodyParams = new URLSearchParams();
55
+
56
+ if (existingBody) {
57
+ try {
58
+ const existingParams = new URLSearchParams(existingBody);
59
+
60
+ existingParams.forEach((value, key) => {
61
+ bodyParams.append(key, value);
62
+ });
63
+ } catch {
64
+ logger.error('Error parsing existing body as URL-encoded data', {
65
+ middleware: 'wallet-complete-redirection',
66
+ existingBody,
67
+ ip
68
+ });
69
+ }
70
+ }
71
+
72
+ queryParams.forEach((value, key) => {
73
+ bodyParams.append(key, value);
74
+ });
75
+
76
+ const body = bodyParams.toString();
53
77
 
54
78
  if (!sessionId) {
55
79
  logger.warn(
@@ -70,7 +94,7 @@ const withWalletCompleteRedirection =
70
94
  }
71
95
 
72
96
  const request = await fetch(requestUrl, {
73
- method: req.method,
97
+ method: 'POST',
74
98
  headers: requestHeaders,
75
99
  body
76
100
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@akinon/next",
3
3
  "description": "Core package for Project Zero Next",
4
- "version": "1.92.0-rc.23",
4
+ "version": "1.92.0-rc.25",
5
5
  "private": false,
6
6
  "license": "MIT",
7
7
  "bin": {
@@ -34,7 +34,7 @@
34
34
  "set-cookie-parser": "2.6.0"
35
35
  },
36
36
  "devDependencies": {
37
- "@akinon/eslint-plugin-projectzero": "1.92.0-rc.23",
37
+ "@akinon/eslint-plugin-projectzero": "1.92.0-rc.25",
38
38
  "@babel/core": "7.26.10",
39
39
  "@babel/preset-env": "7.26.9",
40
40
  "@babel/preset-typescript": "7.27.0",