risecommerce / searchsanitizer
Free For Search Query
Package info
github.com/risecommerce/SearchSanitizer
Type:magento2-module
pkg:composer/risecommerce/searchsanitizer
Requires
- php: ~7.0.13|~7.1.0|~7.2.0|~7.3.0|~7.4.0|^8.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Overview Risecommerce Search Sanitizer helps secure your Magento store by preventing harmful or unwanted search terms from being saved. It blocks SQL keywords, HTML/JS code, and any custom patterns you define. Instead of saving unsafe terms, customers see a warning message on the search page.
Features
- Enable/Disable Control – Turn the sanitizer on or off from Admin.
- Custom Ignore List – Define comma-separated words or patterns that you want to block (e.g.,
select,drop,delete,script). - Custom Warning Message – Show a user-friendly message when blocked terms are entered.
- Admin Configuration – Manage all settings from Stores → Configuration → Risecommerce → Search Sanitizer.
- Improved Security – Stops malicious inputs from being stored in search query logs.
Use Case
- Protects your database from SQL injections attempted via search.
- Prevents saving of unwanted spam keywords or HTML.
- Gives customers a clear warning instead of a technical error.
For more details about the extension, visit the Risecommerce SearchSanitizer Extension for Magento 2.
If you're looking to enhance your Magento store further, consider hiring a dedicated Magento developer.
For support or inquiries, please visit our contact page.
Support
- Magento versions: 2.3.x, 2.4.x
How to Install the Extension
Method I: Manual Installation
- Download the archive file.
- Unzip the file.
- Create a folder at
[Magento_Root]/app/code/Risecommerce/SearchSanitizer. - Move the unzipped files to the directory
[Magento_Root]/app/code/Risecommerce/SearchSanitizer.
Method II: Using Composer
Run the following command:
composer require risecommerce/searchsanitizer
#Enable Extension:
- php bin/magento module:enable Risecommerce_SearchSanitizer
- php bin/magento setup:upgrade
- php bin/magento setup:di:compile
- php bin/magento setup:static-content:deploy
- php bin/magento cache:flush
#Disable Extension:
- php bin/magento module:disable Risecommerce_SearchSanitizer
- php bin/magento setup:upgrade
- php bin/magento setup:di:compile
- php bin/magento setup:static-content:deploy
- php bin/magento cache:flush