[Bug 6803] New: Removing remote include in MODS xslt
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6803 Bug #: 6803 Summary: Removing remote include in MODS xslt Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Platform: All OS/Version: All Status: NEW Severity: minor Priority: P5 Component: OPAC AssignedTo: oleonard@myacpl.org ReportedBy: m.de.rooy@rijksmuseum.nl QAContact: koha-bugs@lists.koha-community.org Removing remote include in MARC21slim2MODS3-1.xsl (http://www.loc.gov/marcxml/xslt/MARC21slimUtils.xsl). Safer and preventing errors like: [Sun Aug 28 04:47:39 2011] [error] [client 66.249.72.86] [Sun Aug 28 04:47:39 2011] opac-export.pl: compilation error: file http://www.loc.gov/shutdown-message.html line 2 element html [Sun Aug 28 04:47:39 2011] [error] [client 66.249.72.86] [Sun Aug 28 04:47:39 2011] opac-export.pl: xsltParseStylesheetProcess : document is not a stylesheet [Sun Aug 28 04:47:39 2011] [error] [client 66.249.72.86] [Sun Aug 28 04:47:39 2011] opac-export.pl: at /usr/share/koha/prodclone/C4/Record.pm line 260 At the same time removing CRs from the MODS xsl file with dos2unix. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6803 --- Comment #1 from M. de Rooy <m.de.rooy@rijksmuseum.nl> 2011-08-29 09:15:36 UTC --- Created attachment 5206 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=5206 Patch -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6803 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 |PATCH-Sent Status|NEW |ASSIGNED Patch Status|--- |Needs Signoff AssignedTo|oleonard@myacpl.org |m.de.rooy@rijksmuseum.nl --- Comment #2 from M. de Rooy <m.de.rooy@rijksmuseum.nl> 2011-08-29 09:16:48 UTC --- Test this patch by exporting to MODS format from opac-detail page. This patch does not change any functionality. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6803 --- Comment #3 from Owen Leonard <oleonard@myacpl.org> 2011-08-29 13:37:17 UTC --- Does this bug only happen when there is a connectivity issue with LOC? Just wondering how to reproduce the problem so I can verify the fix. Also, why the CR removal? Was that causing problems? I would much rather see this patch only include the correction, and see the CR removal in a different patch if it's a necessary change. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6803 --- Comment #4 from M. de Rooy <m.de.rooy@rijksmuseum.nl> 2011-08-29 13:41:10 UTC --- (In reply to comment #3)
Does this bug only happen when there is a connectivity issue with LOC? Just wondering how to reproduce the problem so I can verify the fix. Also, why the CR removal? Was that causing problems? I would much rather see this patch only include the correction, and see the CR removal in a different patch if it's a necessary change.
Probably, LOC was down, rebooting or something like that. (This was again discovered by Googlebot..) Hard to reproduce. I agree that the CR removal is not really necessary. In terms of security it is probably safer to remove the remote include. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6803 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #5206|0 |1 is obsolete| | --- Comment #5 from M. de Rooy <m.de.rooy@rijksmuseum.nl> 2011-08-31 12:57:08 UTC --- Created attachment 5239 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=5239 Revised patch Does no longer remove CRs. Note that the presence of these CRs will now give two [ignorable] whitespace errors when applying. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6803 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Needs Signoff |Does not apply --- Comment #6 from Owen Leonard <oleonard@myacpl.org> 2011-08-31 13:34:11 UTC --- Applying: 6803: Removing remote include in MODS xslt error: patch failed: koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2MODS3-1.xsl:1 error: koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2MODS3-1.xsl: patch does not apply /kohaclone/.git/rebase-apply/patch:31: new blank line at EOF. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6803 --- Comment #7 from M. de Rooy <m.de.rooy@rijksmuseum.nl> 2011-08-31 13:40:00 UTC --- (In reply to comment #6)
Applying: 6803: Removing remote include in MODS xslt error: patch failed: koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2MODS3-1.xsl:1 error: koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2MODS3-1.xsl: patch does not apply /kohaclone/.git/rebase-apply/patch:31: new blank line at EOF.
It applies with me but warning for whitespace (CRs ?). This could be a git version difference. Will try to remove them and send a new one. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6803 --- Comment #8 from M. de Rooy <m.de.rooy@rijksmuseum.nl> 2011-08-31 14:02:09 UTC --- With my git version, it does not seem to be possible to resolve this whitespace issue with carriage returns. I cannot send another patch. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6803 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #5239|0 |1 is obsolete| | --- Comment #9 from M. de Rooy <m.de.rooy@rijksmuseum.nl> 2011-10-13 06:55:03 UTC --- Created attachment 5873 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=5873 Revised patch In the meantime the xsl file has been converted to unix format. This resolves the whitespace trouble. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6803 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Does not apply |Needs Signoff -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6803 --- Comment #10 from Owen Leonard <oleonard@myacpl.org> 2011-11-04 19:27:34 UTC --- I still would like to have better test plan for this. Does this bug only happen when there is a connectivity issue with LOC? -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6803 Frère Sébastien Marie <semarie-koha@latrappe.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |semarie-koha@latrappe.fr --- Comment #11 from Frère Sébastien Marie <semarie-koha@latrappe.fr> 2011-11-07 08:20:29 UTC --- (In reply to comment #10)
I still would like to have better test plan for this. Does this bug only happen when there is a connectivity issue with LOC?
You could modify the include in "MARC21slim2MODS3-1.xsl", in order to have the href point to a URI where the status in well-known (sorry not well explained... try with examples after...) In order to obtain check with a connectivity issue: - for test a DNS problem: change in "MARC21slim2MODS3-1.xsl", the href (line 3) with : "http://www.loc.gov.example.com/marcxml/xslt/MARC21slimUtils.xsl" This will result Koha trying resolving "www.loc.gov.example.com" (which should not exist), and see what happens. - for test a server error: (not exactly the same that before: DNS answered correctly, but no HTTP server found), replace by a valid DNS name where no HTTP server are running (for example "http://google-public-dns-a.google.com/marcxml/xslt/MARC21slimUtils.xsl", but you should prefer a local owned-host, instead of perform aggression to a public internet server) This will result Koha successfully resolv "google-public-dns-a.google.com", but cannot connecting to http service. - for test a 404 error: replace by "http://www.loc.gov/marcxml/xslt/MARC21slimUtils.xsl.noexistant". This will result Koha successfully resolv "www.loc.gov", successfully connect to http service, but (should) obtain a 404 error. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
From another point of view (consistency), I would like to replace it too; it is
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6803 --- Comment #12 from M. de Rooy <m.de.rooy@rijksmuseum.nl> 2011-11-07 08:33:34 UTC --- (In reply to comment #11) Thanks for more tests! Do you think that is safer to replace this remote include by the way? the only remaining remote include in a xslt file in Koha. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6803 --- Comment #13 from Frère Sébastien Marie <semarie-koha@latrappe.fr> 2011-11-07 09:19:08 UTC --- (In reply to comment #12)
Thanks for more tests! Do you think that is safer to replace this remote include by the way?
From another point of view (consistency), I would like to replace it too; it is the only remaining remote include in a xslt file in Koha.
It will be better to not depend of external source. If I remember well about XSLT processing, XML::LibXSLT don't use security by default (and koha don't set it). But, this remote inclusion is *not* a security issue (if you trust LOC), as for successfully use this vector, an attacker should: - or compromise LOC (change what it is included) - or compromise your local network infrastructure (DNS, router, server, ...) So the risk is low (not null, but low). -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6803 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QAContact|koha-bugs@lists.koha-commun |ian.walls@bywatersolutions. |ity.org |com -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6803 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #5873|0 |1 is obsolete| | --- Comment #14 from M. de Rooy <m.de.rooy@rijksmuseum.nl> 2011-12-07 13:29:00 UTC --- Created attachment 6636 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=6636 Rebased patch Now also includes nbsp entity def. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6803 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #6636|0 |1 is obsolete| | --- Comment #15 from Chris Cormack <chris@bigballofwax.co.nz> 2011-12-10 09:53:08 UTC --- Created attachment 6698 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=6698 Bug 6803: Replacing remote XSL include Replacing remote include by local one. This resolves possible connectivity issues (see Bugzilla comments). Should theoretically be safer and faster too. December 7, 2011: Rebased and included nbsp entity definition (bug 7141). Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6803 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz Patch Status|Needs Signoff |Signed Off -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6803 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |paul.poulain@biblibre.com Version|master |rel_3_6 Patch Status|Signed Off |Patch Pushed --- Comment #16 from Paul Poulain <paul.poulain@biblibre.com> 2011-12-13 14:58:02 UTC --- QA comment * small patch, nothing specific to say * prove t/00-valid-xml.t is OK patch pushed, please test -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6803 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org