Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
EncryptCookies
n/a
0 / 0
n/a
0 / 0
0
n/a
0 / 0
1<?php
2
3namespace App\Http\Middleware;
4
5use Illuminate\Cookie\Middleware\EncryptCookies as Middleware;
6
7class EncryptCookies extends Middleware
8{
9    /**
10     * The names of the cookies that should not be encrypted.
11     *
12     * @var array<int, string>
13     */
14    protected $except = [
15        // FIRE-1271: the coverage-report grant cookie is a plaintext nonce
16        // (64-char alphanumeric) minted by CoverageController::grant and
17        // looked up in Redis. Encrypting it would (a) balloon its size for
18        // no benefit (nonces aren't secrets in a meaningful sense — they're
19        // opaque handles to a server-side cache entry) and (b) fight the
20        // stateful/Sanctum pipeline which auto-nulls cookies that fail
21        // decryption. Keep plaintext both ways.
22        'coverage_grant',
23    ];
24}