[Koha-bugs] [Bug 29939] New: Improve auth check in opac-ratings-ajax.pl

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Jan 25 13:20:31 CET 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29939

            Bug ID: 29939
           Summary: Improve auth check in opac-ratings-ajax.pl
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P5 - low
         Component: Architecture, internals, and plumbing
          Assignee: koha-bugs at lists.koha-community.org
          Reporter: m.de.rooy at rijksmuseum.nl
        QA Contact: testopia at bugs.koha-community.org

This script certainly needs a better authentication check but it is less
trivial than the others.
The block with Koha::Ratings calls should be within a check on loggedinuser.
The whole script is a weird mix between an ajax script and a regular one.

This statement will crash on an undefined borrowernumber (SQL constraint):
  Koha::Rating->new( { biblionumber => $biblionumber, borrowernumber =>
$loggedinuser, rating_value => $rating_value, })->store;

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.


More information about the Koha-bugs mailing list