HHH-16892 Fix LocalXmlResourceResolver not resolving some dtd URLs that use the https scheme
This commit is contained in:
parent
7d4a00be91
commit
502ee95171
|
@ -203,14 +203,14 @@ public class LocalXmlResourceResolver implements javax.xml.stream.XMLResolver {
|
|||
public boolean matches(String publicId, String systemId) {
|
||||
if ( publicId != null ) {
|
||||
if ( publicId.startsWith( httpBase )
|
||||
|| publicId.matches( httpsBase ) ) {
|
||||
|| publicId.startsWith( httpsBase ) ) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if ( systemId != null ) {
|
||||
if ( systemId.startsWith( httpBase )
|
||||
|| systemId.matches( httpsBase ) ) {
|
||||
|| systemId.startsWith( httpsBase ) ) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -77,7 +77,10 @@ public class LocalXmlResourceResolverTest {
|
|||
"https://hibernate.org/dtd/hibernate-configuration,org/hibernate/hibernate-configuration-3.0.dtd",
|
||||
|
||||
"http://hibernate.sourceforge.net/hibernate-configuration,org/hibernate/hibernate-configuration-3.0.dtd",
|
||||
"https://hibernate.sourceforge.net/hibernate-configuration,org/hibernate/hibernate-configuration-3.0.dtd"
|
||||
"https://hibernate.sourceforge.net/hibernate-configuration,org/hibernate/hibernate-configuration-3.0.dtd",
|
||||
|
||||
"http://hibernate.org/dtd/hibernate-mapping-3.0.dtd,org/hibernate/hibernate-mapping-3.0.dtd",
|
||||
"https://hibernate.org/dtd/hibernate-mapping-3.0.dtd,org/hibernate/hibernate-mapping-3.0.dtd"
|
||||
})
|
||||
void resolve_dtd_localResource(String id, String expectedLocalResource) throws XMLStreamException {
|
||||
// publicId
|
||||
|
|
Loading…
Reference in New Issue