[RESPDAM-50] Prevent cropping overload Created: 14/Sep/21  Updated: 09/Feb/22  Resolved: 09/Feb/22

Status: Closed
Project: DAM Focal
Component/s: None
Affects Version/s: 2.0.6
Fix Version/s: 2.2

Type: Improvement Priority: Neutral
Reporter: Richard Gange Assignee: Raphael Falvo
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
relation
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[X]  Architecture Decision Record (ADR)
Sprint: Sprint 14

 Description   

Prevent flooding the system with multiple calls to .imaging:

/magnolia/.imaging/focalpoint/999x999/dam/jcr:c322407c-02b7-4fbb-ab8f-8a61dbc349a2/Carrousel.jpg

A hacker would call this url incrementing "999x999" from 1 to infinite.

So that the imaging workspace would overflow or would request a high CPU usage from cropping the images.

Notes:
We should configure different breakpoints (bp) and the imaging/focal point module should return the resources that equals is is just above this bp.

For example, we could configure:

<=400 returns 400px
<=800 returns 800px
<=1024 returns 1024px
<=1200 returns 1200px
<=1600 returns 1600px (this is the last the the greatest)

Generated at Mon Feb 12 00:42:03 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.