diff --git a/VERSION b/VERSION index 38670bb..6232e7e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.3.45 +1.3.46 diff --git a/resources/views/components/admin/secret-field.blade.php b/resources/views/components/admin/secret-field.blade.php index 9e3ec5d..febad18 100644 --- a/resources/views/components/admin/secret-field.blade.php +++ b/resources/views/components/admin/secret-field.blade.php @@ -15,7 +15,15 @@

{{ $entry['label'] }}

-

{{ $entry['key'] }}

+ {{-- The NAME OF THE SERVER VARIABLE, not the internal registry key. + + It used to print `stripe.secret` — an identifier from + SecretVault::REGISTRY that means nothing on this page and is not + something an operator can type anywhere. The env name is: it is + what stands in the server file, it is what the .env tab of this + same page lists, and when the badge beside this says "Aus der + Serverdatei" it is the answer to "which line?". --}} +

{{ $entry['envKey'] }}

test(Integrations::class); + + $page->assertSee('STRIPE_SECRET') + ->assertSee('INBOUND_MAIL_PASSWORD') + ->assertSee('HETZNER_DNS_TOKEN') + ->assertSee('MONITORING_API_TOKEN'); + + // Not asserted by absence from the HTML: the key legitimately stays in + // wire:key and in the modal arguments, where it is an identifier nobody + // reads. What must not happen is printing it AS TEXT under the label. + $component = Illuminate\Support\Facades\File::get( + resource_path('views/components/admin/secret-field.blade.php') + ); + $withoutComments = (string) preg_replace('/\{\{--.*?--\}\}/s', '', $component); + + // Between tags, i.e. as a text node — the key stays inside attributes + // (wire:key, wire:click, the modal arguments), where it is an identifier + // nobody reads and removing it would break the page. + expect($withoutComments)->toMatch('/>\s*\{\{ \$entry\[.envKey.\] \}\}\s*and($withoutComments)->not->toMatch('/>\s*\{\{ \$entry\[.key.\] \}\}\s*