Description
Marcel de Rooy
2019-11-18 10:29:22 UTC
> 2. Should not we have koha_xslt_security in etc/config.xml?
We do not need it at this moment. But I will post it to the subsequent report to add at least a commented entry.
Created attachment 99686 [details] [review] Bug 24052: Rename XSLT_Handler Should be XSLT::Base now. Removes old XSLT_Handler stub too (from bug 23290). Result of a git grep | sed statement. Test plan: Run qa tools (so modules compile). Run t/db_dependent/Breeding.t Run t/db_dependent/Koha/XSLT/Base.t (This test fails when only this patch has been applied; see subsequent patch.) Enable XSLT use on results and details display. Check search results and detail view on OPAC and staff. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Created attachment 99687 [details] [review] Bug 24052: Fix Koha/XSLT/Base.t Moving the separate small attachments into the test script. Creating them now as temporary files. Deleting original files. Since Breeding.t also used one of these files, a similar change was made in that script. Test plan: Run t/db_dependent/Koha/XSLT/Base.t. Should pass now. Run t/db_dependent/Breeding.t again. Git grep on XSLT_Handler. You should only find release notes. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Created attachment 99688 [details] [review] Bug 24052: Catch warning between test 6 and 7 Resolve: ok 6 - Engine returns error on undefined text XSLT::Base: Empty String at /usr/share/koha/Koha/XSLT/Base.pm line 214. ok 7 - Engine returns error on empty string Test plan: Run perl Base.t and verify that this warning is no longer printed. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Created attachment 99689 [details] [review] Bug 24052: Add koha_xslt_security to koha-conf.xml The line for enabling the unsafe expand_entities option is commented and includes a warning to keep it like that ;) Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> koha_1 | # Failed test 'Remote import does not fail on read_net' koha_1 | # at t/db_dependent/Koha/XSLT/Security.t line 124. koha_1 | # found warning: XSLT::Base: I/O warning : failed to load HTTP resource koha_1 | # expected to find warning: (?^u:I/O warning : failed to load external entity) koha_1 | # Looks like you failed 1 test of 7. koha_1 | [21:53:52] t/db_dependent/Koha/XSLT/Security.tD8 Master D8 fails t_db_dependent_Koha_XSLT_Security_t.Remote import does not fail on read_net (1450) But Koha_19.11_D8 passes: Remote import does not fail on read_net (47) 0.35 seconden Passed Triggered security callback for read_file (47) 1 ms Passed Triggered security callback for read_net (47) 1 ms Passed Triggered security callback for write_file (47) 1 ms Passed Triggered security callback for write_net (47) 1 ms Passed external entity did not get through (47) 0 ms Passed external entity got through (47) Created attachment 100371 [details] [review] Bug 24052: Rename XSLT_Handler Should be XSLT::Base now. Removes old XSLT_Handler stub too (from bug 23290). Result of a git grep | sed statement. Test plan: Run qa tools (so modules compile). Run t/db_dependent/Breeding.t Run t/db_dependent/Koha/XSLT/Base.t (This test fails when only this patch has been applied; see subsequent patch.) Enable XSLT use on results and details display. Check search results and detail view on OPAC and staff. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Created attachment 100372 [details] [review] Bug 24052: Fix Koha/XSLT/Base.t Moving the separate small attachments into the test script. Creating them now as temporary files or code fragments. Deleting original files. Since Breeding.t also used one of these files, a similar change was made in that script. Test plan: Run t/db_dependent/Koha/XSLT/Base.t. Should pass now. Run t/db_dependent/Breeding.t again. Git grep on XSLT_Handler. You should only find release notes. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Created attachment 100373 [details] [review] Bug 24052: Catch warning between test 5 and 6 Resolve: ok 5 - Engine returns error on undefined text XSLT::Base: Empty String at /usr/share/koha/Koha/XSLT/Base.pm line 214. ok 6 - Engine returns error on empty string Test plan: Run perl Base.t and verify that this warning is no longer printed. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Created attachment 100374 [details] [review] Bug 24052: Add koha_xslt_security to koha-conf.xml The line for enabling the unsafe expand_entities option is commented and includes a warning to keep it like that ;) Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Created attachment 100406 [details] [review] Bug 24052: Rename XSLT_Handler Should be XSLT::Base now. Removes old XSLT_Handler stub too (from bug 23290). Result of a git grep | sed statement. Test plan: Run qa tools (so modules compile). Run t/db_dependent/Breeding.t Run t/db_dependent/Koha/XSLT/Base.t (This test fails when only this patch has been applied; see subsequent patch.) Enable XSLT use on results and details display. Check search results and detail view on OPAC and staff. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Created attachment 100407 [details] [review] Bug 24052: Fix Koha/XSLT/Base.t Moving the separate small attachments into the test script. Creating them now as temporary files or code fragments. Deleting original files. Since Breeding.t also used one of these files, a similar change was made in that script. Test plan: Run t/db_dependent/Koha/XSLT/Base.t. Should pass now. Run t/db_dependent/Breeding.t again. Git grep on XSLT_Handler. You should only find release notes. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Created attachment 100408 [details] [review] Bug 24052: Catch warning between test 5 and 6 Resolve: ok 5 - Engine returns error on undefined text XSLT::Base: Empty String at /usr/share/koha/Koha/XSLT/Base.pm line 214. ok 6 - Engine returns error on empty string Test plan: Run perl Base.t and verify that this warning is no longer printed. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Created attachment 100409 [details] [review] Bug 24052: Add koha_xslt_security to koha-conf.xml The line for enabling the unsafe expand_entities option is commented and includes a warning to keep it like that ;) Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Thx Owen ! Shall I add your signoff line or would you? Created attachment 100453 [details] [review] Bug 24052: Rename XSLT_Handler Should be XSLT::Base now. Removes old XSLT_Handler stub too (from bug 23290). Result of a git grep | sed statement. Test plan: Run qa tools (so modules compile). Run t/db_dependent/Breeding.t Run t/db_dependent/Koha/XSLT/Base.t (This test fails when only this patch has been applied; see subsequent patch.) Enable XSLT use on results and details display. Check search results and detail view on OPAC and staff. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Created attachment 100454 [details] [review] Bug 24052: Fix Koha/XSLT/Base.t Moving the separate small attachments into the test script. Creating them now as temporary files or code fragments. Deleting original files. Since Breeding.t also used one of these files, a similar change was made in that script. Test plan: Run t/db_dependent/Koha/XSLT/Base.t. Should pass now. Run t/db_dependent/Breeding.t again. Git grep on XSLT_Handler. You should only find release notes. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Created attachment 100455 [details] [review] Bug 24052: Catch warning between test 5 and 6 Resolve: ok 5 - Engine returns error on undefined text XSLT::Base: Empty String at /usr/share/koha/Koha/XSLT/Base.pm line 214. ok 6 - Engine returns error on empty string Test plan: Run perl Base.t and verify that this warning is no longer printed. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Created attachment 100456 [details] [review] Bug 24052: Add koha_xslt_security to koha-conf.xml The line for enabling the unsafe expand_entities option is commented and includes a warning to keep it like that ;) Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Owen Leonard <oleonard@myacpl.org> (In reply to Marcel de Rooy from comment #16) > Thx Owen ! > Shall I add your signoff line or would you? Fixed Created attachment 101118 [details] [review] Bug 24052: Rename XSLT_Handler Should be XSLT::Base now. Removes old XSLT_Handler stub too (from bug 23290). Result of a git grep | sed statement. Test plan: Run qa tools (so modules compile). Run t/db_dependent/Breeding.t Run t/db_dependent/Koha/XSLT/Base.t (This test fails when only this patch has been applied; see subsequent patch.) Enable XSLT use on results and details display. Check search results and detail view on OPAC and staff. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 101119 [details] [review] Bug 24052: Fix Koha/XSLT/Base.t Moving the separate small attachments into the test script. Creating them now as temporary files or code fragments. Deleting original files. Since Breeding.t also used one of these files, a similar change was made in that script. Test plan: Run t/db_dependent/Koha/XSLT/Base.t. Should pass now. Run t/db_dependent/Breeding.t again. Git grep on XSLT_Handler. You should only find release notes. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 101120 [details] [review] Bug 24052: Catch warning between test 5 and 6 Resolve: ok 5 - Engine returns error on undefined text XSLT::Base: Empty String at /usr/share/koha/Koha/XSLT/Base.pm line 214. ok 6 - Engine returns error on empty string Test plan: Run perl Base.t and verify that this warning is no longer printed. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 101121 [details] [review] Bug 24052: Add koha_xslt_security to koha-conf.xml The line for enabling the unsafe expand_entities option is commented and includes a warning to keep it like that ;) Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Nice work everyone! Pushed to master for 20.05 enhancement not backported to 19.11.x |