1. updated league/commonmark to 2.7.0(fixed CVE-2025-46734)

2. added feature to remove disposable email to be used during signup
This commit is contained in:
Gitea
2025-05-09 16:20:47 +05:30
parent cf010f018b
commit 3830d2e0f9
5 changed files with 187 additions and 9 deletions

View File

@@ -28,7 +28,7 @@ class Register extends Component
{
$validated = $this->validate([
'name' => ['required', 'string', 'max:255'],
'email' => ['required', 'string', 'lowercase', 'email', 'max:255', 'unique:'.User::class],
'email' => ['required', 'string', 'lowercase', 'email', 'max:255', 'indisposable', 'unique:'.User::class],
'password' => ['required', 'string', 'confirmed', Rules\Password::defaults()],
]);

View File

@@ -14,7 +14,8 @@
"laravel/framework": "^12.0",
"laravel/tinker": "^2.10.1",
"livewire/flux": "^2.1",
"livewire/livewire": "^3.6"
"livewire/livewire": "^3.6",
"propaganistas/laravel-disposable-email": "^2.4"
},
"require-dev": {
"barryvdh/laravel-debugbar": "^3.15",

90
composer.lock generated
View File

@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "f1d41505247807e937b78e4e92b1571e",
"content-hash": "972e884837f3870524619dc37aa08d0f",
"packages": [
{
"name": "anourvalar/eloquent-serialize",
@@ -2591,16 +2591,16 @@
},
{
"name": "league/commonmark",
"version": "2.6.2",
"version": "2.7.0",
"source": {
"type": "git",
"url": "https://github.com/thephpleague/commonmark.git",
"reference": "06c3b0bf2540338094575612f4a1778d0d2d5e94"
"reference": "6fbb36d44824ed4091adbcf4c7d4a3923cdb3405"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/thephpleague/commonmark/zipball/06c3b0bf2540338094575612f4a1778d0d2d5e94",
"reference": "06c3b0bf2540338094575612f4a1778d0d2d5e94",
"url": "https://api.github.com/repos/thephpleague/commonmark/zipball/6fbb36d44824ed4091adbcf4c7d4a3923cdb3405",
"reference": "6fbb36d44824ed4091adbcf4c7d4a3923cdb3405",
"shasum": ""
},
"require": {
@@ -2637,7 +2637,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "2.7-dev"
"dev-main": "2.8-dev"
}
},
"autoload": {
@@ -2694,7 +2694,7 @@
"type": "tidelift"
}
],
"time": "2025-04-18T21:09:27+00:00"
"time": "2025-05-05T12:20:28+00:00"
},
{
"name": "league/config",
@@ -4197,6 +4197,82 @@
],
"time": "2024-07-20T21:41:07+00:00"
},
{
"name": "propaganistas/laravel-disposable-email",
"version": "2.4.14",
"source": {
"type": "git",
"url": "https://github.com/Propaganistas/Laravel-Disposable-Email.git",
"reference": "a1d50a51cb8ec13596a477e2a1bf35f47fa6b88d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Propaganistas/Laravel-Disposable-Email/zipball/a1d50a51cb8ec13596a477e2a1bf35f47fa6b88d",
"reference": "a1d50a51cb8ec13596a477e2a1bf35f47fa6b88d",
"shasum": ""
},
"require": {
"ext-json": "*",
"illuminate/cache": "^10.0|^11.0|^12.0",
"illuminate/config": "^10.0|^11.0|^12.0",
"illuminate/console": "^10.0|^11.0|^12.0",
"illuminate/contracts": "^10.0|^11.0|^12.0",
"illuminate/support": "^10.0|^11.0|^12.0",
"illuminate/validation": "^10.0|^11.0|^12.0",
"php": "^8.1"
},
"require-dev": {
"laravel/pint": "^1.14",
"mockery/mockery": "^1.4.2",
"orchestra/testbench": "*",
"phpunit/phpunit": "^10.5|^11.5.3"
},
"type": "library",
"extra": {
"laravel": {
"providers": [
"Propaganistas\\LaravelDisposableEmail\\DisposableEmailServiceProvider"
]
}
},
"autoload": {
"psr-4": {
"Propaganistas\\LaravelDisposableEmail\\": "src/",
"Propaganistas\\LaravelDisposableEmail\\Tests\\": "tests/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Propaganistas",
"email": "Propaganistas@users.noreply.github.com"
}
],
"description": "Disposable email validator",
"keywords": [
"disposable",
"email",
"laravel",
"mail",
"temporary",
"throwaway",
"validator"
],
"support": {
"issues": "https://github.com/Propaganistas/Laravel-Disposable-Email/issues",
"source": "https://github.com/Propaganistas/Laravel-Disposable-Email/tree/2.4.14"
},
"funding": [
{
"url": "https://github.com/Propaganistas",
"type": "github"
}
],
"time": "2025-05-01T00:56:00+00:00"
},
{
"name": "psr/cache",
"version": "3.0.0",

100
config/disposable-email.php Normal file
View File

@@ -0,0 +1,100 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| JSON Source URLs
|--------------------------------------------------------------------------
|
| The source URLs yielding a list of disposable email domains. Change these
| to whatever source you like. Just make sure they all return a JSON array.
|
| A sensible default is provided using jsDelivr's services. jsDelivr is
| a free service, so there are no uptime or support guarantees.
|
*/
'sources' => [
'https://cdn.jsdelivr.net/gh/disposable/disposable-email-domains@master/domains.json',
],
/*
|--------------------------------------------------------------------------
| Fetch class
|--------------------------------------------------------------------------
|
| The class responsible for fetching the contents of the source url.
| The default implementation makes use of file_get_contents and
| json_decode and will probably suffice for most applications.
|
| If your application has different needs (e.g. behind a proxy) then you
| can define a custom fetch class here that carries out the fetching.
| Your custom class should implement the Fetcher contract.
|
*/
'fetcher' => \Propaganistas\LaravelDisposableEmail\Fetcher\DefaultFetcher::class,
/*
|--------------------------------------------------------------------------
| Storage Path
|--------------------------------------------------------------------------
|
| The location where the retrieved domains list should be stored locally.
| The path should be accessible and writable by the web server. A good
| place for storing the list is in the framework's own storage path.
|
*/
'storage' => storage_path('framework/disposable_domains.json'),
/*
|--------------------------------------------------------------------------
| Whitelist Configuration
|--------------------------------------------------------------------------
|
| Here you may define a list of whitelist domains that should be allowed.
| These domains will be removed from the list of disposable domains.
|
| Insert as "mydomain.com", without the @ symbol.
|
*/
'whitelist' => [],
/*
|--------------------------------------------------------------------------
| Include Subdomains
|--------------------------------------------------------------------------
|
| Determines whether subdomains should be validated based on the disposability
| status of their parent domains. Enabling this will treat any subdomain of
| a disposable domain as disposable too (e.g., 'temp.abc.com' if 'abc.com'
| is disposable).
|
*/
'include_subdomains' => false,
/*
|--------------------------------------------------------------------------
| Cache Configuration
|--------------------------------------------------------------------------
|
| Here you may define whether the disposable domains list should be cached.
| If you disable caching or when the cache is empty, the list will be
| fetched from local storage instead.
|
| You can optionally specify an alternate cache connection or modify the
| cache key as desired.
|
*/
'cache' => [
'enabled' => true,
'store' => 'default',
'key' => 'disposable_email:domains',
],
];

File diff suppressed because one or more lines are too long