mirror of
https://github.com/flyimg/flyimg.git
synced 2026-04-25 09:45:50 +03:00
Labels
No labels
Docs
Docs
Docs
Security
UnitTest
bug
dependencies
duplicate
enhancement
enhancement
enhancement
hacktoberfest
help wanted
invalid
pull-request
question
stale
version 1
version 2
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/flyimg#283
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/flyimg/flyimg/pull/104
Author: @sadok-f
Created: 7/20/2017
Status: ✅ Merged
Merged: 8/21/2017
Merged by: @sadok-f
Base:
master← Head:add-signature-generation📝 Commits (4)
2ca0d25Add signature generation: Closes #96f77e5e0Fix codeclimate warning, closes #960254da7Throw exception when calling encrypt fct and securoty key is empty closes #96896a796Merge branch 'master' into add-signature-generation📊 Changes
5 files changed (+187 additions, -19 deletions)
View changed files
📝
app.php(+18 -7)📝
config/parameters.yml(+5 -1)📝
src/Core/Handler/ImageHandler.php(+11 -1)📝
src/Core/Handler/SecurityHandler.php(+91 -10)📝
tests/Core/Handler/SecurityHandlerTest.php(+62 -0)📄 Description
Adding a new security layer to Flyimg application, thanks to @joelwurtz who submitted a RFC #96.
Files changed:
parameters.yml:
To enable the security check, you have to add a Security key to
security_keyparam, and all requested to flyimg should be hashed.How I can hash my request?
The SecurityHandler has a public encrypt function responsible for encrypt/decrypt requests.
We added a simple command line to encrypt the url and generate the hashed one.
Example:
next with the generated hash you can access you image by calling:
http://localhost:8888/upload/SnNSOFp4d3RYV1pET1k2di9pUk1nUTZneGRaYk9HUEJsWjlXODdGb1JjL0pSOFcxTTJvMDhHVWZJa1kvVkl4STh0L2tiTkw3TGpmTU9TSU5yL1FnM1E9PQ==🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.