Project

Profile

Help

Bug #6014

closed

Allowed protocols restrictions don't work in Saxon 11

Added by Norm Tovey-Walsh over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
2023-05-04
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
11
Fix Committed on Branch:
11
Fixed in Maintenance Release:
Platforms:

Description

Or at least, some of them don't. For example jaxptest.AllowedProtocolsTest.testExternalProtocolDTD003 fails.

Actions #1

Updated by Michael Kay over 1 year ago

It seems to be the same problem as #6013. The test case is explicitly trying to load "com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl" and that doesn't work in JDK 9+. JAXP (from JDK9) has a mechanism to load the JDK default parser without doing dynamic loading, but we don't provide a way to request that via TransformerFactory properties.

Actions #2

Updated by Norm Tovey-Walsh over 1 year ago

I'm not sure I agree. The #6013 issue is about the illegal reflective access warning message from JDK9, but that is (or claims to be) only a warning. I think this is about the rule for allowed protocols not getting passed all the way through to the resolver, which happily pulls the file URI and causes the test to fail.

Actions #3

Updated by Norm Tovey-Walsh over 1 year ago

In fact commit 1ec3d8b6 fixes this bug on the saxon12 branch by setting the Feature.ALLOWED_PROTOCOLS feature in addition to the factory setting.

I wonder if that was an appropriate fix...given that I can't think of any way to interrogate the factory for the setting later on, I don't think we can do any better...

Actions #4

Updated by Norm Tovey-Walsh over 1 year ago

  • Fix Committed on Branch 11 added

I've committed the fix from the saxon12 branch and the test now passes. I'm not closing this yet because it feels like there's still a possibility of further discussion.

Actions #5

Updated by Debbie Lockett over 1 year ago

  • Status changed from New to Resolved
Actions #6

Updated by Debbie Lockett over 1 year ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in Maintenance Release 11.6 added

Bug fix applied in the Saxon 11.6 maintenance release.

Please register to edit this issue

Also available in: Atom PDF