[Bug 19691] New: Enforce OPAC SEARCH LIMIT server-side
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19691 Bug ID: 19691 Summary: Enforce OPAC SEARCH LIMIT server-side Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: enhancement Priority: P5 - low Component: Searching Assignee: david.bourgault@inlibro.com Reporter: david.bourgault@inlibro.com QA Contact: testopia@bugs.koha-community.org Current behavior of the OPAC_SEARCH_LIMIT variable (set in httpd.conf) is to add a hidden HTML input in masthead.inc. This works, but makes it easy to override the limit by altering the URL. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19691 David Bourgault <david.bourgault@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19691 --- Comment #1 from David Bourgault <david.bourgault@inlibro.com> --- Created attachment 69335 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=69335&action=edit Bug 19691 - Move code to opac-search.pl Removes the hidden input from masthead.inc, and adds a line to opac-search.pl to enforce the limit. Test plan: Before: 0) Set OPAC_SEARCH_LIMIT and OPAC_LIMIT_OVERRIDE to valid values in koha-httpd.conf (they should be commented) 1) Reload apache 2) Perform a search in the OPAC. You'll see the limit you specified appended to the URL and reflected in the results. 3) Manually remove the limit from the URL and load the page; the search results will not reflect the limit. After: 0) With the same apache config 1) Perform a search from the OPAC. The limit will not show up in the URL, but will be reflected in the search results. There should be no way of circumventing the limit. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19691 David Bourgault <david.bourgault@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david.bourgault@inlibro.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19691 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply CC| |alexbuckley@catalyst.net.nz --- Comment #2 from Alex Buckley <alexbuckley@catalyst.net.nz> --- Hi there Can you please rebase this as it is not applying cleanly on master as the below output shows: Apply? [(y)es, (n)o, (i)nteractive] y Applying: Bug 19691 - Move code to opac-search.pl Using index info to reconstruct a base tree... M koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc M opac/opac-search.pl Falling back to patching base and 3-way merge... Auto-merging opac/opac-search.pl Auto-merging koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc CONFLICT (content): Merge conflict in koha-tmpl/opac-tmpl/bootstrap/en/includes/masthead.inc Failed to merge in the changes. Patch failed at 0001 Bug 19691 - Move code to opac-search.pl The copy of the patch that failed is found in: /home/vagrant/kohaclone/.git/rebase-apply/patch When you have resolved this problem run "git bz apply --continue". If you would prefer to skip this patch, instead run "git bz apply --skip". To restore the original branch and stop patching run "git bz apply --abort". Patch left in /tmp/Bug-19691---Move-code-to-opac-searchpl-BrIj3i.patch Cheers, Alex -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19691 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #3 from Fridolin Somers <fridolin.somers@biblibre.com> --- In this case remove also code from C4::Auth opac_search_limit => $opac_search_limit, -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19691 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|david.bourgault@inlibro.com |koha-bugs@lists.koha-commun | |ity.org CC|david.bourgault@inlibro.com |caroline.cyr-la-rose@inlibr | |o.com -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org