Security and validation utilities for GLB import/export operations Provides path validation, type whitelisting, and safe null checking.
More...
|
| static bool | IsValidExportPath (string path, out string sanitizedPath) |
| | Validates and sanitizes a file export path Returns true if the path is valid, with sanitized path in the out parameter.
|
| |
| static bool | IsValidFileName (string filename, out string sanitizedFileName) |
| | Validates a filename for export.
|
| |
| static bool | IsAllowedComponentType (Type type) |
| | Validates if a type is safe to instantiate during import Prevents arbitrary code execution through malicious GLB files.
|
| |
| static bool | IsAllowedTypeName (string typeName) |
| | Validates if a type name is safe before attempting to resolve it.
|
| |
| static bool | IsNullOrDestroyed (UnityEngine.Object obj) |
| | Safe null check for Unity objects that handles destroyed objects Prevents MissingReferenceException.
|
| |
| static bool | IsTransformNullOrDestroyed (Transform transform) |
| | Safe null check for Transform specifically.
|
| |
| static T | ParseEnumSafe< T > (string value, T defaultValue) |
| | Safe enum parsing that returns default value on failure.
|
| |
| static Type | ResolveTypeCached (string typeName) |
| | Cached type resolution for performance Searches all assemblies only once per type name.
|
| |
| static void | ClearTypeCache () |
| | Clears the type resolution cache Call this when assemblies are reloaded.
|
| |
Security and validation utilities for GLB import/export operations Provides path validation, type whitelisting, and safe null checking.
◆ ClearTypeCache()
| static void realvirtual.GLBSecurityUtilities.ClearTypeCache |
( |
| ) |
|
|
static |
Clears the type resolution cache Call this when assemblies are reloaded.
◆ IsAllowedComponentType()
| static bool realvirtual.GLBSecurityUtilities.IsAllowedComponentType |
( |
Type |
type | ) |
|
|
static |
Validates if a type is safe to instantiate during import Prevents arbitrary code execution through malicious GLB files.
◆ IsAllowedTypeName()
| static bool realvirtual.GLBSecurityUtilities.IsAllowedTypeName |
( |
string |
typeName | ) |
|
|
static |
Validates if a type name is safe before attempting to resolve it.
◆ IsNullOrDestroyed()
| static bool realvirtual.GLBSecurityUtilities.IsNullOrDestroyed |
( |
UnityEngine::Object |
obj | ) |
|
|
static |
Safe null check for Unity objects that handles destroyed objects Prevents MissingReferenceException.
◆ IsTransformNullOrDestroyed()
| static bool realvirtual.GLBSecurityUtilities.IsTransformNullOrDestroyed |
( |
Transform |
transform | ) |
|
|
static |
Safe null check for Transform specifically.
◆ IsValidExportPath()
| static bool realvirtual.GLBSecurityUtilities.IsValidExportPath |
( |
string |
path, |
|
|
out string |
sanitizedPath |
|
) |
| |
|
static |
Validates and sanitizes a file export path Returns true if the path is valid, with sanitized path in the out parameter.
◆ IsValidFileName()
| static bool realvirtual.GLBSecurityUtilities.IsValidFileName |
( |
string |
filename, |
|
|
out string |
sanitizedFileName |
|
) |
| |
|
static |
Validates a filename for export.
◆ ParseEnumSafe< T >()
| static T realvirtual.GLBSecurityUtilities.ParseEnumSafe< T > |
( |
string |
value, |
|
|
T |
defaultValue |
|
) |
| |
|
static |
Safe enum parsing that returns default value on failure.
◆ ResolveTypeCached()
| static Type realvirtual.GLBSecurityUtilities.ResolveTypeCached |
( |
string |
typeName | ) |
|
|
static |
Cached type resolution for performance Searches all assemblies only once per type name.