Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] - io.opencaesar.oml.util.OmlCatalog.CatalogEx#makeAbsolute needs to use path calculations #85

Closed
1 task
NicolasRouquette opened this issue Sep 28, 2021 · 1 comment

Comments

@NicolasRouquette
Copy link
Member

Description

A clear and concise description of what the bug is.

This function is invoked when the XML parser is reading a rewrite uri catalog entry.

io.opencaesar.oml.util.OmlCatalog.CatalogEx#makeAbsolute can be invoked as follows:

  • baseUri = file:/C:/some/directory/oml
  • sysid = file:/

This will produce an invalid result like this: file:/C:/some/directory/oml/file:/

The correct result should be: file:/C:/some/directory/oml/

Steps to Reproduce

Steps to reproduce the behavior:

  • Step 1 This bug is reproducible with oml 1.0.3 on windows where a catalog like this:
<?xml version='1.0'?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="public">
	<rewriteURI
		rewritePrefix="file:./"
		uriStartString="http://"/>
</catalog>

Expected Behavior

A clear and concise description of what should be the expected behavior.

Additional Context

Enter any other details such as dependencies, environment, examples, etc.

Relevant screenshots

If applicable, add screenshots to help illustrate the issue.

@NicolasRouquette
Copy link
Member Author

The catalog should have instead:

<?xml version='1.0'?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="public">
	<rewriteURI
		rewritePrefix="./"
		uriStartString="http://"/>
</catalog>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant