Closed (fixed)
Project:
Services Views
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
3 Dec 2012 at 19:37 UTC
Updated:
8 Apr 2013 at 04:50 UTC
If no limit is specified, a default limit of 10 is enforced instead. I think it would make more sense to simply not enforce a specific limit in this case, and allow the view's own limit (if any) to be used.
| Comment | File | Size | Author |
|---|---|---|---|
| services_views.limit_.patch | 1.59 KB | john morahan |
Comments
Comment #1
ygerasimov commentedI understand what you are requesting, but I would like to keep the things as they are. The thing is that if we do not apply limit this opens DoS attack possibility that is hard to notice. So if you really need to have unlimited behavior by default you can alter arguments (hook_services_request_preprocess_alter) adding default limit parameter:
Hope it will do the job for your case.
Comment #2
john morahan commentedSorry, but I think you may have misunderstood what I was requesting. I do not want unlimited behaviour by default. I want to use the limit that is configured in the view, rather than a hard-coded limit of 10 always, so that while there is still a limit by default, it is configurable.
I do not see how this increases the possibility of a DoS attack. What's to prevent someone sending ?limit=2147483647 with the current setup?
Comment #3
windmaomao commentedwhat i see is that the default value (if not set) should be view's setting, currently while using pagination, it'll be always 10 records, unless i set it otherwise, ex.
$items = services_views_retrieve('services_dispenses_api', 'services_1', array(), 0, 25);
let me know if it makes sense.
Comment #4
ygerasimov commentedCommitted.