darvis/livewire-injection-stopper
TypeError exceptions (for example: Cannot assign array to property ...) when they originate from Livewire update flowsdontReport, reportable, and renderable hooks for stronger compatibility with Laravel exception pipelinesapp/Exceptions/Handler.php integration guidanceblocked_user_agents config by using single 'python' pattern instead of multiple variantsstr_contains() for wildcard matchingpython-requests, python/requests, python requests, python requests 2., python-urllib (all now covered by 'python')Protect your Laravel + Livewire application from spam bots and security vulnerabilities.
This package protects your Laravel application in two ways:
Automatically blocks automated spam bots (like Python scripts, curl, wget) from accessing your website. No more spam form submissions!
Scans your Livewire components and tells you which properties attackers could manipulate. For example, if you have public $isAdmin = false, an attacker could change it to true in their browser!
composer require darvis/livewire-injection-stopper
That's it! The spam bot blocking is now active.
Run this command to scan your Livewire components:
php artisan livewire-injection-stopper:audit
It will show you which properties need protection.
Before (Vulnerable):
class CheckoutComponent extends Component
{
public $price = 100.00; // ⚠️ Attacker can change this to $0.01!
}
After (Secure):
use Livewire\Attributes\Locked;
class CheckoutComponent extends Component
{
#[Locked] // ✅ Now protected!
public $price = 100.00;
}
By default, these bots are blocked:
python-requests)curl, wget)scrapy)Real browsers and users are never blocked.
Want to customize? Publish the config file:
php artisan vendor:publish --tag=livewire-injection-stopper-config
Now you can:
For detailed documentation, see the /docs folder:
MIT License - feel free to use in any project!
Created by Arvid de Jong
Need help? Check the documentation or email info@arvid.nl
How can I help you explore Laravel packages today?