1
0
Fork 0
mirror of https://github.com/lrsjng/h5ai synced 2026-01-09 09:37:05 +01:00
No description
Find a file
glubsy 2582d2272b Limit thumbnail generation
* This fixes a denial-of-service exploit that would allow the client to
generate an infinite number of thumbnails and fill up the storage completely.
Since the client had control over the requested thumbnail sizes, it could make arbitrary requests for thumbnails, and every time the backend did not find an already generated thumbnail with the specified sizes, it would happily generate a new one.
* Remove the ability of the client to decide thumbnail dimensions and
only let the back-end do this by reading the configuration.
* Limit the number of generated thumbnails per file to only one, with
"landscape" dimensions (4/3).
* Use CSS "object-fit" property to adjust displaying of landscape thumbnails into squares. Ref: https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit
2021-01-25 01:55:07 +00:00
src Limit thumbnail generation 2021-01-25 01:55:07 +00:00
test Update. 2019-04-24 02:09:57 +02:00
.editorconfig Update. 2019-05-05 23:03:07 +02:00
.eslintignore Update. 2020-07-24 10:03:34 +02:00
.eslintrc.yml Update. 2020-07-24 10:03:34 +02:00
.gitignore Update. 2019-05-05 23:03:07 +02:00
CHANGELOG.md Update. 2021-01-24 16:10:29 +01:00
ghu.js Update. 2020-02-19 18:56:23 +01:00
package-lock.json Update. 2021-01-24 16:10:29 +01:00
package.json Update. 2021-01-24 16:10:29 +01:00
README.md Update. 2020-02-16 02:38:06 +01:00

h5ai

license web github

A modern HTTP web server index for Apache httpd, lighttpd, and nginx.

Important

  • Do not install any files from the src folder, they need to be preprocessed to work correctly!
  • Find a preprocessed package and detailed install instructions on the project page.
  • For bug reports and feature requests please use issues.

Build

There are installation ready packages for the latest releases and dev builds. But to build h5ai yourself either git clone or download the repository. From within the root folder run the following commands to find a fresh zipball in folder build (tested on linux only, requires node 10.0+ to be installed, might work on other configurations).

> npm install
> npm run build

License

The MIT License (MIT)

Copyright (c) 2020 Lars Jung (https://larsjung.de)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

References

h5ai profits from other projects, all of them licensed under the MIT license too. Exceptions are some Material Design icons (CC BY 4.0).