HHH-16892 Fix LocalXmlResourceResolver not resolving some dtd URLs that use the https scheme
This commit is contained in:
parent
5201a45055
commit
f55fa0cce4
|
@ -259,14 +259,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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -72,7 +72,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