fix(security): Pods-Meta nur lesbar, wenn Pods aktiv, aber nicht nutzbar
Ist Pods aktiv, seine API aber nicht nutzbar, melden gesampelte und registrierte Meta-Schlüssel READONLY statt schreibbar. Sonst würden Pods-Felder (auch über Pods' register_meta-Integration) an Pods vorbei geschrieben. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
8f3a4e76eb
commit
234fd1edac
+4
-1
@@ -192,7 +192,10 @@ final class Plugin
|
||||
|
||||
private static function contentSchema(): ContentSchema
|
||||
{
|
||||
$sources = [new RegisteredMetaSource(), new SampledMetaSource()];
|
||||
// Pods active but unusable: its meta keys (sampled, or registered via Pods' register_meta integration) must not
|
||||
// be written past Pods.
|
||||
$podsUnusable = defined('PODS_VERSION') && ! PodsFieldSource::isAvailable();
|
||||
$sources = [new RegisteredMetaSource(readOnly: $podsUnusable), new SampledMetaSource(readOnly: $podsUnusable)];
|
||||
if (PodsFieldSource::isAvailable()) {
|
||||
array_unshift($sources, new PodsFieldSource());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user