You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Flight] Enforce "simple object" rule in production (#27502)
We only allow plain objects that can be faithfully serialized and
deserialized through JSON to pass through the serialization boundary.
It's a bit too expensive to do all the possible checks in production so
we do most checks in DEV, so it's still possible to pass an object in
production by mistake. This is currently exaggerated by frameworks
because the logs on the server aren't visible enough. Even so, it's
possible to do a mistake without testing it in DEV or just testing a
conditional branch. That might have security implications if that object
wasn't supposed to be passed.
We can't rely on only checking if the prototype is `Object.prototype`
because that wouldn't work with cross-realm objects which is
unfortunate. However, if it isn't, we can check wether it has exactly
one prototype on the chain which would catch the common error of passing
a class instance.
DiffTrain build for commit e61a60f.
Copy file name to clipboardExpand all lines: compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -24770,7 +24770,7 @@ function createFiberRoot(
24770
24770
return root;
24771
24771
}
24772
24772
24773
-
var ReactVersion = "18.3.0-canary-1fc58281a-20231011";
24773
+
var ReactVersion = "18.3.0-canary-e61a60fac-20231011";
Copy file name to clipboardExpand all lines: compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -8968,7 +8968,7 @@ var devToolsConfig$jscomp$inline_1008 = {
8968
8968
throwError("TestRenderer does not support findFiberByHostInstance()");
8969
8969
},
8970
8970
bundleType: 0,
8971
-
version: "18.3.0-canary-1fc58281a-20231011",
8971
+
version: "18.3.0-canary-e61a60fac-20231011",
8972
8972
rendererPackageName: "react-test-renderer"
8973
8973
};
8974
8974
varinternals$jscomp$inline_1201={
@@ -8999,7 +8999,7 @@ var internals$jscomp$inline_1201 = {
Copy file name to clipboardExpand all lines: compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -9394,7 +9394,7 @@ var devToolsConfig$jscomp$inline_1050 = {
9394
9394
throwError("TestRenderer does not support findFiberByHostInstance()");
9395
9395
},
9396
9396
bundleType: 0,
9397
-
version: "18.3.0-canary-1fc58281a-20231011",
9397
+
version: "18.3.0-canary-e61a60fac-20231011",
9398
9398
rendererPackageName: "react-test-renderer"
9399
9399
};
9400
9400
varinternals$jscomp$inline_1242={
@@ -9425,7 +9425,7 @@ var internals$jscomp$inline_1242 = {
0 commit comments