-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add route that sets projectRestrictedViewSetting size (DEV-2304) #2794
Conversation
DEV-2304 Change default value of the param projectRestrictedViewSize
Reported by Loïc (DCSR, Lausanne): Hello everybody, It has been mentioned many times but I can’t a trace of it, so here it comes again: making default RestrictedViewSettings being "!512,512" barely makes sense. Only when you look at it in its whole, it is blurred because the full resolution of, let’s say 5120x5120 pixels is reduced to 521x512, then the resolution is reduced to 1%. When you zoom in half, looking at a picture of 2560x2560 then the resolution is reduced to 4%, zoom a bit more to 1280x1280 the resolution is reduced to 16% of the images, some faces are recognizable, text readable. And of course, when you are able to zoom in to get a portion of 512x512 pixel, then you see that portion at full resolution! Just walk your looking glass around and see it all! So, the default should not be “!512x512” but “pct:1”, the resolution of the image displayed is 1% of the original resolution, whatever the size of the part the image. Best regards, https://dasch.atlassian.net/browse/DSQ-211 Related issue: DEV-991 |
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2794 +/- ##
==========================================
+ Coverage 18.00% 22.23% +4.23%
==========================================
Files 281 244 -37
Lines 28899 23123 -5776
==========================================
- Hits 5202 5141 -61
+ Misses 23697 17982 -5715 ☔ View full report in Codecov by Sentry. |
DEV-2304 Change default value of the param projectRestrictedViewSize
the current default value "!512x512" should be changed to "pct:1" see DEV-2269 for more detail |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
User input must always be sanitized and validated. You cannot just simply take the users String
value and put it into a query template. This opens the door for all kind of bad things, e.g. attacks and invalid data being persisted.
Make sure the user input is:
- sanitized : the new endpoint is not open for a malicious SPARQL injection
- validated: the
size
value is valid. AFAIU this must be a IIIF size expression
Add documentation for the size
parameter. Also check your current documentation its example is GET
whilst the endpoint is POST
.
Pull Request Checklist
Task Description/Number
Issue Number: DEV-2304
Basic Requirements
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
Does this PR introduce a breaking change?
Does this PR change client-test-data?