PHPackages                             aalfiann/url-param-firewall - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. aalfiann/url-param-firewall

ActiveLibrary[Security](/categories/security)

aalfiann/url-param-firewall
===========================

A PSR7 middleware for url parameter firewall for Slim Framework 3

1.0.1(7y ago)018MITPHPPHP &gt;=5.5

Since Sep 27Pushed 7y ago1 watchersCompare

[ Source](https://github.com/aalfiann/url-param-firewall)[ Packagist](https://packagist.org/packages/aalfiann/url-param-firewall)[ RSS](/packages/aalfiann-url-param-firewall/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (3)Used By (0)

URL Parameter Firewall
======================

[](#url-parameter-firewall)

[![Version](https://camo.githubusercontent.com/27abe832d5a8e4cf10cf7de74634675ddb5a49600205edf6f9ab0fc5224d093e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c61746573742d312e302e312d677265656e2e737667)](https://github.com/aalfiann/url-param-firewall)[![Total Downloads](https://camo.githubusercontent.com/8eddd055d0a1fedfe6f62a446078930a7a39b58b880530e6b68a5446315a397e/68747470733a2f2f706f7365722e707567782e6f72672f61616c6669616e6e2f75726c2d706172616d2d6669726577616c6c2f646f776e6c6f616473)](https://packagist.org/packages/aalfiann/url-param-firewall)[![License](https://camo.githubusercontent.com/b167b97460eb1bdca31acb9d8a033c20b9dde5140ccc97b7fdb813bb12e40ca5/68747470733a2f2f706f7365722e707567782e6f72672f61616c6669616e6e2f75726c2d706172616d2d6669726577616c6c2f6c6963656e7365)](https://github.com/aalfiann/url-param-firewall/blob/HEAD/LICENSE.md)

A PSR7 middleware for url parameter firewall for [Slim Framework 3](https://slimframework.com).

### Why we should create firewall for url parameter?

[](#why-we-should-create-firewall-for-url-parameter)

1. To prevent from ddos layer 7 which is targeting to attack using random url parameters.
2. To prevent useless webpage cache.
3. To avoid BOT goes to wrong url.
4. To hardening the CSRF and XSS attack.
5. Etc.

So you better to whitelisting url parameter for each routes.

Installation
------------

[](#installation)

Install this package via [Composer](https://getcomposer.org/).

```
composer require "aalfiann/url-param-firewall:^1.0"

```

Usage
-----

[](#usage)

```
use \Psr\Http\Message\ServerRequestInterface as Request;
use \Psr\Http\Message\ResponseInterface as Response;
use \aalfiann\middleware\ParamFirewall;

$app->get('/', function (Request $request, Response $response) {
    $body = $response->getBody();
    $body->write('You will see this message if passed url firewall');

    return $response->withBody($body);
})->(new ParamFirewall(['_','page']))->setName("/");
```

Open browser and now make a test:
 &gt;&gt; WORK
 &gt;&gt; WORK
[http://yourdomain.com/?page=1&amp;\_=3123123](http://yourdomain.com/?page=1&_=3123123) &gt;&gt; WORK
 &gt;&gt; 404
[http://yourdomain.com/?page=1&amp;\_=3123123&amp;product=test](http://yourdomain.com/?page=1&_=3123123&product=test) &gt;&gt; 404

Note:
We should allow url param name `_` because it used in jquery ajax cache.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

2784d ago

PHP version history (2 changes)1.0.0PHP &gt;=5.4

1.0.1PHP &gt;=5.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/c101f6be505e4713be942f6b80d849b46702e6f4069430e1dbbe60fa18289c54?d=identicon)[aalfiann](/maintainers/aalfiann)

---

Top Contributors

[![aalfiann](https://avatars.githubusercontent.com/u/9458941?v=4)](https://github.com/aalfiann "aalfiann (4 commits)")

---

Tags

middlewarepsr7slimphpfirewall

### Embed Badge

![Health badge](/badges/aalfiann-url-param-firewall/health.svg)

```
[![Health](https://phpackages.com/badges/aalfiann-url-param-firewall/health.svg)](https://phpackages.com/packages/aalfiann-url-param-firewall)
```

###  Alternatives

[pragmarx/firewall

A Laravel IP whitelisting and blacklisting

1.4k988.9k](/packages/pragmarx-firewall)[akaunting/laravel-firewall

Web Application Firewall (WAF) package for Laravel

999465.8k2](/packages/akaunting-laravel-firewall)[shieldon/shieldon

Web application firewall for PHP.

87328.2k1](/packages/shieldon-shieldon)[stevenmaguire/laravel-middleware-csp

Provides support for enforcing Content Security Policy with headers in Laravel responses.

39107.6k](/packages/stevenmaguire-laravel-middleware-csp)[masterro/laravel-xss-filter

Filter user input for XSS but don't touch other html

41254.5k](/packages/masterro-laravel-xss-filter)[jeroenvisser101/leakybucket

An implementation of the Leaky Bucket algorithm.

44116.6k](/packages/jeroenvisser101-leakybucket)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
