This is an automated email from the ASF dual-hosted git repository.
chaokunyang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/fory-site.git
The following commit(s) were added to refs/heads/main by this push:
new b3c7c47881 🔄 synced local 'docs/guide/' with remote 'docs/guide/'
b3c7c47881 is described below
commit b3c7c47881aeaffd4da06e901ef80acf0191eee0
Author: chaokunyang <[email protected]>
AuthorDate: Wed May 27 00:34:18 2026 +0000
🔄 synced local 'docs/guide/' with remote 'docs/guide/'
---
docs/guide/python/configuration.md | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/docs/guide/python/configuration.md
b/docs/guide/python/configuration.md
index a902192382..7a16bbee0f 100644
--- a/docs/guide/python/configuration.md
+++ b/docs/guide/python/configuration.md
@@ -211,7 +211,6 @@ class SafeDeserializationPolicy(DeserializationPolicy):
def validate_class(self, cls, is_local, **kwargs):
if cls.__module__ in dangerous_modules:
raise ValueError(f"Blocked dangerous class:
{cls.__module__}.{cls.__name__}")
- return None
def intercept_reduce_call(self, callable_obj, args, **kwargs):
if getattr(callable_obj, "__name__", "") == "Popen":
@@ -229,11 +228,15 @@ fory = pyfory.Fory(xlang=False, ref=True, strict=False,
policy=policy)
Available policy hooks include:
+Reference validation hooks reject by raising exceptions and otherwise leave
deserialized references
+unchanged.
+
| Hook | Description
|
| -------------------------------------------- |
--------------------------------------------------- |
| `validate_class(cls, is_local)` | Validate or block class types
|
-| `validate_module(module, is_local)` | Validate or block module
imports |
+| `validate_module(module_name, is_local)` | Validate or block module
imports |
| `validate_function(func, is_local)` | Validate or block function
references |
+| `validate_method(method, is_local)` | Validate or block method
references |
| `intercept_reduce_call(callable_obj, args)` | Intercept `__reduce__`
invocations |
| `inspect_reduced_object(obj)` | Inspect or replace objects
created via `__reduce__` |
| `intercept_setstate(obj, state)` | Sanitize state before
`__setstate__` |
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]