You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On a PDF export, it is sometimes necessary to includes graphics coming from the webapp, but the way the links are generated is not compatible with the filters used in the Security-proxy.
the port is not specified, because it was not set in the settings UI (the secured port was set though). Setting 443 in the classic port solved the extra ":". It is not necessary though, the URL is still valid, and can pass the URI.normalize() step.
The Security-Proxy (via the spring-security configuration) will reject non-normalized URLs.
Trying the URL using tools like cURL is transparent because it will normalize the URL before sending it. we might want to use --path-as-is to disable the behaviour:
--path-as-is
Tell curl to not handle sequences of /../ or /./ in the given
URL path. Normally curl will squash or merge them according to
standards but with this option set you tell it not to do that.
We could use the java.net.URI class and the normalize() method before trying to fetch the URL.
Also line 132, the log level might not be very relevant, I would suggest debug instead of error.
The text was updated successfully, but these errors were encountered:
On a PDF export, it is sometimes necessary to includes graphics coming from the webapp, but the way the links are generated is not compatible with the filters used in the Security-proxy.
Example of URL:
Here is the code which is currently failing to retrieve the image:
https://github.com/georchestra/geonetwork/blob/georchestra-gn3.8.2/services/src/main/java/org/fao/geonet/api/records/formatters/ImageReplacedElementFactory.java#L134
--path-as-is
to disable the behaviour:We could use the java.net.URI class and the
normalize()
method before trying to fetch the URL.Also line 132, the log level might not be very relevant, I would suggest debug instead of error.
The text was updated successfully, but these errors were encountered: