[Koha-bugs] [Bug 24327] New: anonymous suggestions should not be allowed if AnonymousPatron misconfigured

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Jan 2 11:37:32 CET 2020


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

            Bug ID: 24327
           Summary: anonymous suggestions should not be allowed if
                    AnonymousPatron misconfigured
 Change sponsored?: ---
           Product: Koha
           Version: unspecified
          Hardware: All
                OS: All
            Status: ASSIGNED
          Severity: normal
          Priority: P5 - low
         Component: OPAC
          Assignee: jonathan.druart at bugs.koha-community.org
          Reporter: jonathan.druart at bugs.koha-community.org
        QA Contact: testopia at bugs.koha-community.org

If anonymous suggestions (AnonSuggestions) are allowed but AnonymousPatron is
not set correctly, it's possible to create a suggestion without being logged in
and the app explodes with a FK constraint:

DBD::mysql::st execute failed: Cannot add or update a child row: a foreign key
constraint fails (`koha_kohadev`.`suggestions`, CONSTRAINT
`suggestions_ibfk_suggestedby` FOREIGN KEY (`suggestedby`) REFERENCES `bo
rrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE) [for
Statement "INSERT INTO `suggestions` ( `STATUS`, `author`, `branchcode`,
`collectiontitle`, `copyrightdate`, `isbn`, `itemtype`, `note`, `pa
tronreason`, `place`, `publishercode`, `quantity`, `suggestedby`,
`suggesteddate`, `title`) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?
)" with ParamValues: 0="ASKED", 1="", 2=undef, 3="", 4=undef, 5=""
, 6="AUDIOBOOK", 7="", 8="", 9="", 10="", 11=undef, 12="0",
13='2020-01-02T10:28:40', 14="xxx"] at
/usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1836.               
Broken FK constraint at /usr/share/perl5/Exception/Class/Base.pm line 88        
        Exception::Class::Base::throw('Koha::Exceptions::Object::FKConstraint',
'error', 'Broken FK constraint', 'broken_fk', 'suggestedby') called at
/kohadevbox/koha/Koha/Object.pm line 164

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


More information about the Koha-bugs mailing list