fuko-php / masked Goto Github PK
View Code? Open in Web Editor NEWMask sensitive data: replace blacklisted elements with redacted values
Home Page: https://packagist.org/packages/fuko-php/masked
License: MIT License
Mask sensitive data: replace blacklisted elements with redacted values
Home Page: https://packagist.org/packages/fuko-php/masked
License: MIT License
Hi. I've scrutinized your code and have notice several code block with similar code. For instance:
This method hides values from array https://github.com/fuko-php/masked/blob/master/src/Protect.php#L44 and you have also method hideValue
that does the same work.
And your hideValues
could look like this
public static function hideValues(array $values)
{
foreach ($values as $value){
self::hideValue($value);
}
}
The same problem also is here: https://github.com/fuko-php/masked/blob/master/src/Protect.php#L185
foreach ($names as $name)
{
self::hideInput($name, $type);
}
the use of FILTER_SANITIZE_STRING
is deprecated since PHP 8.1.0.
this is used twice in fuko-php/masked/src/Masked/Redact.php
on line 107
and 109
.
the use of htmlspecialchars()
instead is encouraged.
This needs to be updated in the code.
Unfortunately, not PHP8 compatible. Pls, mark is as abandoned.
Detecting credit card numbers is relatively easy. It will be a great addition if they are detected as sensitive data without any declaration and properly masked/redacted
If the sensitive data contains special chars, in some occasions they are going to be escaped, and Protect::protectScalar()
is not going to detect them. For example quotes in JSON
echo json_encode('password"'); // output is "password\""
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.