ruiquelhas / houdin Goto Github PK
View Code? Open in Web Editor NEWRoute-level file type validation for hapi parsed in-memory request payloads
Home Page: https://www.npmjs.com/package/houdin
License: BSD 3-Clause "New" or "Revised" License
Route-level file type validation for hapi parsed in-memory request payloads
Home Page: https://www.npmjs.com/package/houdin
License: BSD 3-Clause "New" or "Revised" License
Update to the latest major version of hoek.
Link the style guide to http://hapijs.com/styleguide.
The file-type
module introduced a minor update that increased the input size requirement for validating magic numbers. A test is currently failing because the buffer that gets validated does not have the newly required length.
Add a documentation section linking to magik for a rundown of the supported file types.
The file fixtures may not be created beforehand which leads to failing tests, particularly on slower machines.
Update the documentation examples to ensure the code style matches the rules defined in the contribution guidelines.
I have tried to validate various mp4 files, got Bad Request error like:
{
"statusCode": 400,
"error": "Bad Request",
"message": "child \"file\" fails because [\"file\" type is unknown]",
"validation": { "source": "payload", "keys": [ "file" ]
}
When i try to use it as standalone, i got
ValidationError: child "file" fails because ["file" type is unknown]
Ftyp information (in Hex) of my sample set are:
1 - [0x00, 0x00, 0x00, 0x14]
2 - [0x00, 0x00, 0x00, 0x18]
3 - [0x00, 0x00, 0x00, 0x1C]
4 - [0x00, 0x00, 0x00, 0x20]
hoek needs to be updated since there are new versions available which, among other things, fix a security vulnerability.
The static image files currently used in the tests should easily be replaced by some kind of mock.
Currently, the logic to iterate over the payload items is faulty. To avoid issues with duplicate callbacks, the iteration should stop as soon as it hits the first invalid file type. This is currently not happening due to a recent change, leading to a lot of issues when the validation happens through a hapi
plugin, such as copperfield.
Update the keywords array in the package.json
file to ensure they better match the intent of the package itself and to aim for better discoverability.
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.