Benign php 39,987 installs Download

eappointment/mellon 2.06.05

“Validator for parameters and validation helper”

Basename is uppercase README.mdPHP invokes a variable-named function

Evidence

GitLab service URL reference README.md · lines 1–48
1Mellon PHP Validator
2====================
3
4Link to main repository: https://gitlab.com/eappointment/mellon/
5
6Mellon is a validator library using the filter-functions offered by PHP. It is written for PHP micro frameworks which do not have a validation library by themself.
7
8 'Speak, friend, and enter'
9
10-----
11Usage
12-----
13
14In flat PHP, a simple validation would look like this:
15
16```php
⋯8 lines
25```
26
27With a shortcut for all $_REQUEST variables, you could use:
28
29```php
⋯7 lines
37```
38
39To ensure, that nobody uses the superglobals in your project, take a look at the controversial rule in the [PHP MD Config File](phpmd.rules.xml).
40
41--------------
⋯7 lines
Command text invokes mkdir configure · lines 1–12
1#!/bin/bash
2
3REALPATH=$(which realpath || which readlink)
4REALPATH=$([[ "$REALPATH" =~ 'readlink' ]] && echo "$REALPATH -e" || echo "$REALPATH")
5DIR=$(dirname $($REALPATH ${BASH_SOURCE[0]}))
6ROOT=$($REALPATH $DIR/..)
7
8echo "Configuring application"
9echo $ROOT
10
11mkdir -p $ROOT/.git/hooks
12ln -sf $ROOT/bin/test $ROOT/.git/hooks/pre-commit
Shell changes working directory test · lines 1–12
1#!/bin/bash
2
3REALPATH=$(which realpath || which readlink)
4REALPATH=$([[ "$REALPATH" =~ 'readlink' ]] && echo "$REALPATH -e" || echo "$REALPATH")
5DIR=$(dirname $($REALPATH ${BASH_SOURCE[0]}))
6ROOT=$($REALPATH $DIR/..)
7
8echo "Testing application"
9cd $ROOT
10$ROOT/vendor/bin/phpcs --standard=psr2 src/ || exit 1
11$ROOT/vendor/bin/phpmd src/ text phpmd.rules.xml || exit 1
12$ROOT/vendor/bin/phpunit || exit 1
PHP invokes a variable-named function Collection.php · lines 110–116
110:19… Valid($valid);
111 if (!$valid->hasFailed()) {
112 $action($valid->getValue());
113 }
114 return $this;
115 }
116}
PHP shell argument escaping call Exception.php · lines 1–30
⋯6 lines
7namespace BO\Mellon\Failure;
8
9use BO\Mellon\Valid;
10
11class Exception extends \Exception
⋯12 lines
24 . $validator->getName()
25 . "}=="
26 . htmlspecialchars(escapeshellarg(substr((string)$validator->getUnvalidated(), 0, 65536)), ENT_NOQUOTES)
27 . ")";
28 return $this;
29 }
30}

Showing the top 5 files — 6 more files (18 regions) not shown.

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.