dotCMS ContentAsset without identifier throws ArrayIndexOutOfBoundsException exception (HTTP 500 error)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

dotCMS ContentAsset without identifier throws ArrayIndexOutOfBoundsException exception (HTTP 500 error)

dilekciy
Hi,

When you visit the contentAsset URL without the required parameters, such as the export path and identifier, an ArrayIndexOutOfBoundsException exception is thrown.

You can test this by visiting the following URL https://demo.dotcms.com/contentAsset and you'll end up with an ArrayIndexOutOfBoundsException shown in the logs and the user will face the HTTP 500 Response Code page.

I think this is caused by the uri.split function that tries to access the exportPath and uuid, which are not passed, see https://github.com/dotCMS/core/blob/6531f1696438462db38f2f2d5c0f0b4890ee0d7f/dotCMS/src/main/java/com/dotmarketing/servlets/BinaryExporterServlet.java#L124

Wouldn't it be better if this was handled differently? Without throwing a 500 error and ArrayIndexOutOfBoundsException?

I've created a GitHub issue for this already: https://github.com/dotCMS/core/issues/12433

Thank you!

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/463bc3b8-8193-415d-8d3b-261ef5fd493a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: dotCMS ContentAsset without identifier throws ArrayIndexOutOfBoundsException exception (HTTP 500 error)

Jason Tesser-2
sure but we do not support calling it this way.  but yea failing cleaning would be ok here 

On Mon, Aug 28, 2017 at 8:41 AM <[hidden email]> wrote:
Hi,

When you visit the contentAsset URL without the required parameters, such as the export path and identifier, an ArrayIndexOutOfBoundsException exception is thrown.

You can test this by visiting the following URL https://demo.dotcms.com/contentAsset and you'll end up with an ArrayIndexOutOfBoundsException shown in the logs and the user will face the HTTP 500 Response Code page.

I think this is caused by the uri.split function that tries to access the exportPath and uuid, which are not passed, see https://github.com/dotCMS/core/blob/6531f1696438462db38f2f2d5c0f0b4890ee0d7f/dotCMS/src/main/java/com/dotmarketing/servlets/BinaryExporterServlet.java#L124

Wouldn't it be better if this was handled differently? Without throwing a 500 error and ArrayIndexOutOfBoundsException?

I've created a GitHub issue for this already: https://github.com/dotCMS/core/issues/12433

Thank you!

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/463bc3b8-8193-415d-8d3b-261ef5fd493a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/CALDe1GM%3D3ibAAt0XDGEm6LwYaRWaNiO6KMJtYJOQbjnfG6j8qA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.