Relocate PDF and commitment form download logic from shortcode execution to the `template_redirect` hook to prevent HTML output from corrupting binary streams. Key improvements: - Moved download interception to `template_redirect` to ensure clean headers and prevent partial file downloads caused by early buffer output. - Replaced direct `get_user_meta` calls with `IFNEX_User_Bridge::get_user_token` to support automatic token renewal and improved authentication reliability. - Added PDF signature validation (`%PDF` header check) to ensure integrity of remote file responses. - Updated Laravel base controller to include standard `AuthorizesRequests` and `ValidatesRequests` traits.
12 lines
232 B
PHP
12 lines
232 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
|
|
use Illuminate\Foundation\Validation\ValidatesRequests;
|
|
|
|
abstract class Controller
|
|
{
|
|
use AuthorizesRequests, ValidatesRequests;
|
|
}
|