Composer-Sicherheitsupdates, dompdf 3, email-Regel ohne Zeilenumbrueche
- Patch-/Minor-Updates (guzzle, commonmark, flysystem, excel, phpspreadsheet, phpseclib, laravel/framework 11.x) - barryvdh/laravel-dompdf 3.1 (dompdf 3.1.6), Test fuer den PDF-Weg inkl. eingebettetem PHP und Briefpapier - Rueckport des Laravel-12.60-Fixes gegen CRLF in der email-Regel - Protokoll: Ergebnis composer audit, offene Punkte Laravel 12 und PDF-Seitenzahlen Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
47a46b1401
commit
4274bff9e2
7 changed files with 669 additions and 491 deletions
30
app/Support/Validation/Validator.php
Normal file
30
app/Support/Validation/Validator.php
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
namespace App\Support\Validation;
|
||||
|
||||
use Illuminate\Validation\Validator as BaseValidator;
|
||||
|
||||
/**
|
||||
* Rückportierter Sicherheitsfix aus Laravel 12.60 (GHSA-5vg9-5847-vvmq):
|
||||
* Die email-Regel lässt in Laravel 11 Zeilenumbrüche zu, über die sich
|
||||
* Mail-Header einschleusen lassen. Nach dem Update auf Laravel 12 entfernen
|
||||
* (samt Registrierung in AppServiceProvider).
|
||||
*/
|
||||
class Validator extends BaseValidator
|
||||
{
|
||||
/**
|
||||
* @param string $attribute
|
||||
* @param mixed $value
|
||||
* @param array<int, string> $parameters
|
||||
*/
|
||||
public function validateEmail($attribute, $value, $parameters): bool
|
||||
{
|
||||
if (is_string($value) || (is_object($value) && method_exists($value, '__toString'))) {
|
||||
if (preg_match('/[\r\n]/', (string) $value) > 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return parent::validateEmail($attribute, $value, $parameters);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue