You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Antonio Sanso (JIRA)" <ji...@apache.org> on 2011/07/25 16:07:09 UTC

[jira] [Created] (SLING-2156) Provide error handling for POST operations

Provide error handling for POST operations
------------------------------------------

                 Key: SLING-2156
                 URL: https://issues.apache.org/jira/browse/SLING-2156
             Project: Sling
          Issue Type: New Feature
          Components: Servlets
            Reporter: Antonio Sanso


The error handling mechanism described here [0] doesn't seem to apply also to POST operations.
If an error occurs while posting a resource to repository (e.g. avax.jcr.nodetype.ConstraintViolationException: no matching property definition found for) the HtmlResponse.html template is rendered.

This  can also represent a security issue since information as REFERRER/technology stack are shown.
IMHO this page should be at least configurable (if the mechanism in [0] doesn't suite here).

[0] http://sling.apache.org/site/errorhandling.html

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (SLING-2156) Provide error handling for POST operations

Posted by "Antonio Sanso (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-2156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13091871#comment-13091871 ] 

Antonio Sanso commented on SLING-2156:
--------------------------------------

I have attached a new patch (see comment above) implementing few changes (thanks Felix for the hints).

Personally I am +1 for Justin solution but I still think that the two approaches can coexist and both solve different problems.
If there is some interest on my approach I can also provide integration tests.

> Provide error handling for POST operations
> ------------------------------------------
>
>                 Key: SLING-2156
>                 URL: https://issues.apache.org/jira/browse/SLING-2156
>             Project: Sling
>          Issue Type: New Feature
>          Components: Servlets
>            Reporter: Antonio Sanso
>         Attachments: SLING-2156-patch.txt, SLING-2156-patch.txt
>
>
> The error handling mechanism described here [0] doesn't seem to apply also to POST operations.
> If an error occurs while posting a resource to repository (e.g. avax.jcr.nodetype.ConstraintViolationException: no matching property definition found for) the HtmlResponse.html template is rendered.
> This  can also represent a security issue since information as REFERRER/technology stack are shown.
> IMHO this page should be at least configurable (if the mechanism in [0] doesn't suite here).
> [0] http://sling.apache.org/site/errorhandling.html

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (SLING-2156) Provide error handling for POST operations

Posted by "Antonio Sanso (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-2156?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Antonio Sanso updated SLING-2156:
---------------------------------

    Attachment: SLING-2156-patch.txt

attaching revised patch (noticed an error on the previous version).

if you like the approach I will also provide integration tests...

> Provide error handling for POST operations
> ------------------------------------------
>
>                 Key: SLING-2156
>                 URL: https://issues.apache.org/jira/browse/SLING-2156
>             Project: Sling
>          Issue Type: New Feature
>          Components: Servlets
>            Reporter: Antonio Sanso
>         Attachments: SLING-2156-patch.txt
>
>
> The error handling mechanism described here [0] doesn't seem to apply also to POST operations.
> If an error occurs while posting a resource to repository (e.g. avax.jcr.nodetype.ConstraintViolationException: no matching property definition found for) the HtmlResponse.html template is rendered.
> This  can also represent a security issue since information as REFERRER/technology stack are shown.
> IMHO this page should be at least configurable (if the mechanism in [0] doesn't suite here).
> [0] http://sling.apache.org/site/errorhandling.html

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (SLING-2156) Provide error handling for POST operations

Posted by "Antonio Sanso (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-2156?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Antonio Sanso updated SLING-2156:
---------------------------------

    Attachment: SLING-2156-patch.txt

Attaching new patch with the follow differences:

-  Response.sendError is done  rather than throw a ServletException
- a request parameter (:sendError=true) is used instead of configuration



> Provide error handling for POST operations
> ------------------------------------------
>
>                 Key: SLING-2156
>                 URL: https://issues.apache.org/jira/browse/SLING-2156
>             Project: Sling
>          Issue Type: New Feature
>          Components: Servlets
>            Reporter: Antonio Sanso
>         Attachments: SLING-2156-patch.txt, SLING-2156-patch.txt
>
>
> The error handling mechanism described here [0] doesn't seem to apply also to POST operations.
> If an error occurs while posting a resource to repository (e.g. avax.jcr.nodetype.ConstraintViolationException: no matching property definition found for) the HtmlResponse.html template is rendered.
> This  can also represent a security issue since information as REFERRER/technology stack are shown.
> IMHO this page should be at least configurable (if the mechanism in [0] doesn't suite here).
> [0] http://sling.apache.org/site/errorhandling.html

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (SLING-2156) Provide error handling for POST operations

Posted by "Markus Joschko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-2156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13072442#comment-13072442 ] 

Markus Joschko commented on SLING-2156:
---------------------------------------

I very much like the broader approach as I have another use case in mind for which this kind of postresponse creator can be handy:

In my application there is a validating postprocessor that inspects the modifications done within an operation. If it finds something "wrong" it only can throw an exception to prevent the saving of the node. 
The resulting error page is not particular catchy as the error message is a bit hidden. With the postresponse creator it could be presented a lot better to the client.

> Provide error handling for POST operations
> ------------------------------------------
>
>                 Key: SLING-2156
>                 URL: https://issues.apache.org/jira/browse/SLING-2156
>             Project: Sling
>          Issue Type: New Feature
>          Components: Servlets
>            Reporter: Antonio Sanso
>
> The error handling mechanism described here [0] doesn't seem to apply also to POST operations.
> If an error occurs while posting a resource to repository (e.g. avax.jcr.nodetype.ConstraintViolationException: no matching property definition found for) the HtmlResponse.html template is rendered.
> This  can also represent a security issue since information as REFERRER/technology stack are shown.
> IMHO this page should be at least configurable (if the mechanism in [0] doesn't suite here).
> [0] http://sling.apache.org/site/errorhandling.html

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (SLING-2156) Provide error handling for POST operations

Posted by "Antonio Sanso (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-2156?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Antonio Sanso updated SLING-2156:
---------------------------------

    Attachment: SLING-2156-patch.txt

Highlight from the patch:

- a new property is added the to SlingPostServlet in order to enable/disable the error handling (false by default)
- it leverages the existing error handling as for [0]
- doesn't require any code for the end user (just adding a new jsp file under /sling/errohandloing)

[0] http://sling.apache.org/site/errorhandling.html

> Provide error handling for POST operations
> ------------------------------------------
>
>                 Key: SLING-2156
>                 URL: https://issues.apache.org/jira/browse/SLING-2156
>             Project: Sling
>          Issue Type: New Feature
>          Components: Servlets
>            Reporter: Antonio Sanso
>         Attachments: SLING-2156-patch.txt
>
>
> The error handling mechanism described here [0] doesn't seem to apply also to POST operations.
> If an error occurs while posting a resource to repository (e.g. avax.jcr.nodetype.ConstraintViolationException: no matching property definition found for) the HtmlResponse.html template is rendered.
> This  can also represent a security issue since information as REFERRER/technology stack are shown.
> IMHO this page should be at least configurable (if the mechanism in [0] doesn't suite here).
> [0] http://sling.apache.org/site/errorhandling.html

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (SLING-2156) Provide error handling for POST operations

Posted by "Antonio Sanso (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-2156?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Antonio Sanso updated SLING-2156:
---------------------------------

    Attachment: SLING-2156-patch.txt

attaching new patch.

Highlight from the patch:

- it uses the new SPI interface (see SLING 2223)
- the SlingPostServlet is not touched anymore
- an alternative to commit the patch might be a new documentation 'article' (e.g. How to enable error handling for post operation)
                
> Provide error handling for POST operations
> ------------------------------------------
>
>                 Key: SLING-2156
>                 URL: https://issues.apache.org/jira/browse/SLING-2156
>             Project: Sling
>          Issue Type: New Feature
>          Components: Servlets
>            Reporter: Antonio Sanso
>         Attachments: SLING-2156-patch.txt, SLING-2156-patch.txt, SLING-2156-patch.txt
>
>
> The error handling mechanism described here [0] doesn't seem to apply also to POST operations.
> If an error occurs while posting a resource to repository (e.g. avax.jcr.nodetype.ConstraintViolationException: no matching property definition found for) the HtmlResponse.html template is rendered.
> This  can also represent a security issue since information as REFERRER/technology stack are shown.
> IMHO this page should be at least configurable (if the mechanism in [0] doesn't suite here).
> [0] http://sling.apache.org/site/errorhandling.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (SLING-2156) Provide error handling for POST operations

Posted by "Antonio Sanso (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-2156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13072315#comment-13072315 ] 

Antonio Sanso commented on SLING-2156:
--------------------------------------

the issue itself aka SLING-1974 nothing (as said in my comment - "Nor that the issues are really related ") but in the discussion thread there is a mention about a possible filter that helps to decide with response to provide.

I guess I have tackled the problem to widely... :S 

> Provide error handling for POST operations
> ------------------------------------------
>
>                 Key: SLING-2156
>                 URL: https://issues.apache.org/jira/browse/SLING-2156
>             Project: Sling
>          Issue Type: New Feature
>          Components: Servlets
>            Reporter: Antonio Sanso
>
> The error handling mechanism described here [0] doesn't seem to apply also to POST operations.
> If an error occurs while posting a resource to repository (e.g. avax.jcr.nodetype.ConstraintViolationException: no matching property definition found for) the HtmlResponse.html template is rendered.
> This  can also represent a security issue since information as REFERRER/technology stack are shown.
> IMHO this page should be at least configurable (if the mechanism in [0] doesn't suite here).
> [0] http://sling.apache.org/site/errorhandling.html

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (SLING-2156) Provide error handling for POST operations

Posted by "Justin Edelson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-2156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13072308#comment-13072308 ] 

Justin Edelson commented on SLING-2156:
---------------------------------------

sorry, but what does SLING-1974 have to do with this issue?

> Provide error handling for POST operations
> ------------------------------------------
>
>                 Key: SLING-2156
>                 URL: https://issues.apache.org/jira/browse/SLING-2156
>             Project: Sling
>          Issue Type: New Feature
>          Components: Servlets
>            Reporter: Antonio Sanso
>
> The error handling mechanism described here [0] doesn't seem to apply also to POST operations.
> If an error occurs while posting a resource to repository (e.g. avax.jcr.nodetype.ConstraintViolationException: no matching property definition found for) the HtmlResponse.html template is rendered.
> This  can also represent a security issue since information as REFERRER/technology stack are shown.
> IMHO this page should be at least configurable (if the mechanism in [0] doesn't suite here).
> [0] http://sling.apache.org/site/errorhandling.html

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Issue Comment Edited] (SLING-2156) Provide error handling for POST operations

Posted by "Antonio Sanso (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-2156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13072315#comment-13072315 ] 

Antonio Sanso edited comment on SLING-2156 at 7/28/11 12:22 PM:
----------------------------------------------------------------

the issue itself aka SLING-1974 nothing (as said in my comment - "Nor that the issues are really related ") but in the discussion thread there is a mention about a possible filter that helps to decide with response to provide.

I guess I have tackled the problem too widely... :S 

      was (Author: asanso):
    the issue itself aka SLING-1974 nothing (as said in my comment - "Nor that the issues are really related ") but in the discussion thread there is a mention about a possible filter that helps to decide with response to provide.

I guess I have tackled the problem to widely... :S 
  
> Provide error handling for POST operations
> ------------------------------------------
>
>                 Key: SLING-2156
>                 URL: https://issues.apache.org/jira/browse/SLING-2156
>             Project: Sling
>          Issue Type: New Feature
>          Components: Servlets
>            Reporter: Antonio Sanso
>
> The error handling mechanism described here [0] doesn't seem to apply also to POST operations.
> If an error occurs while posting a resource to repository (e.g. avax.jcr.nodetype.ConstraintViolationException: no matching property definition found for) the HtmlResponse.html template is rendered.
> This  can also represent a security issue since information as REFERRER/technology stack are shown.
> IMHO this page should be at least configurable (if the mechanism in [0] doesn't suite here).
> [0] http://sling.apache.org/site/errorhandling.html

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (SLING-2156) Provide error handling for POST operations

Posted by "Ben Peter (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-2156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13163579#comment-13163579 ] 

Ben Peter commented on SLING-2156:
----------------------------------

Justin,


+1 for your proposed patch.
( line 242 in [1] should test for response != null, though I guess).

[1] http://codereview.appspot.com/4826051/diff/1/bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/SlingPostServlet.java

Best,
Ben
                
> Provide error handling for POST operations
> ------------------------------------------
>
>                 Key: SLING-2156
>                 URL: https://issues.apache.org/jira/browse/SLING-2156
>             Project: Sling
>          Issue Type: New Feature
>          Components: Servlets
>            Reporter: Antonio Sanso
>         Attachments: SLING-2156-patch.txt, SLING-2156-patch.txt, SLING-2156-patch.txt, SLING-2156-patch.txt, post_error_handling
>
>
> The error handling mechanism described here [0] doesn't seem to apply also to POST operations.
> If an error occurs while posting a resource to repository (e.g. avax.jcr.nodetype.ConstraintViolationException: no matching property definition found for) the HtmlResponse.html template is rendered.
> This  can also represent a security issue since information as REFERRER/technology stack are shown.
> IMHO this page should be at least configurable (if the mechanism in [0] doesn't suite here).
> [0] http://sling.apache.org/site/errorhandling.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (SLING-2156) Provide error handling for POST operations

Posted by "Antonio Sanso (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-2156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13071867#comment-13071867 ] 

Antonio Sanso commented on SLING-2156:
--------------------------------------

Nor that the issues are really related but this can be also a +1 for the Filter solution proposed in SLING-1974.
Such filter might also take in charge the configurable error handling (e.g. off by default).

WDYT?

> Provide error handling for POST operations
> ------------------------------------------
>
>                 Key: SLING-2156
>                 URL: https://issues.apache.org/jira/browse/SLING-2156
>             Project: Sling
>          Issue Type: New Feature
>          Components: Servlets
>            Reporter: Antonio Sanso
>
> The error handling mechanism described here [0] doesn't seem to apply also to POST operations.
> If an error occurs while posting a resource to repository (e.g. avax.jcr.nodetype.ConstraintViolationException: no matching property definition found for) the HtmlResponse.html template is rendered.
> This  can also represent a security issue since information as REFERRER/technology stack are shown.
> IMHO this page should be at least configurable (if the mechanism in [0] doesn't suite here).
> [0] http://sling.apache.org/site/errorhandling.html

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Issue Comment Edited] (SLING-2156) Provide error handling for POST operations

Posted by "Antonio Sanso (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-2156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13072756#comment-13072756 ] 

Antonio Sanso edited comment on SLING-2156 at 7/29/11 9:30 AM:
---------------------------------------------------------------

Highlight from the patch:

- a new property is added the to SlingPostServlet in order to enable/disable the error handling (false by default)
- it leverages the existing error handling as for [0]
- doesn't require any code for the end user (just adding a new jsp file under /sling/servlet/errorhandler)

[0] http://sling.apache.org/site/errorhandling.html

      was (Author: asanso):
    Highlight from the patch:

- a new property is added the to SlingPostServlet in order to enable/disable the error handling (false by default)
- it leverages the existing error handling as for [0]
- doesn't require any code for the end user (just adding a new jsp file under /sling/errohandloing)

[0] http://sling.apache.org/site/errorhandling.html
  
> Provide error handling for POST operations
> ------------------------------------------
>
>                 Key: SLING-2156
>                 URL: https://issues.apache.org/jira/browse/SLING-2156
>             Project: Sling
>          Issue Type: New Feature
>          Components: Servlets
>            Reporter: Antonio Sanso
>         Attachments: SLING-2156-patch.txt
>
>
> The error handling mechanism described here [0] doesn't seem to apply also to POST operations.
> If an error occurs while posting a resource to repository (e.g. avax.jcr.nodetype.ConstraintViolationException: no matching property definition found for) the HtmlResponse.html template is rendered.
> This  can also represent a security issue since information as REFERRER/technology stack are shown.
> IMHO this page should be at least configurable (if the mechanism in [0] doesn't suite here).
> [0] http://sling.apache.org/site/errorhandling.html

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (SLING-2156) Provide error handling for POST operations

Posted by "Antonio Sanso (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-2156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13072752#comment-13072752 ] 

Antonio Sanso commented on SLING-2156:
--------------------------------------

Great stuff Justin!!
With my "Sling apprentice" hats on I was thinking to a totally different approach :) See my attached path...
The two approaches can coexist though, please give a look at it if you have time.

> Provide error handling for POST operations
> ------------------------------------------
>
>                 Key: SLING-2156
>                 URL: https://issues.apache.org/jira/browse/SLING-2156
>             Project: Sling
>          Issue Type: New Feature
>          Components: Servlets
>            Reporter: Antonio Sanso
>
> The error handling mechanism described here [0] doesn't seem to apply also to POST operations.
> If an error occurs while posting a resource to repository (e.g. avax.jcr.nodetype.ConstraintViolationException: no matching property definition found for) the HtmlResponse.html template is rendered.
> This  can also represent a security issue since information as REFERRER/technology stack are shown.
> IMHO this page should be at least configurable (if the mechanism in [0] doesn't suite here).
> [0] http://sling.apache.org/site/errorhandling.html

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (SLING-2156) Provide error handling for POST operations

Posted by "Antonio Sanso (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-2156?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Antonio Sanso updated SLING-2156:
---------------------------------

    Attachment: post_error_handling
                SLING-2156-patch.txt

attaching new patch. Amendment from the previous one:

- it was not a good idea to use :responseType parameter thus I have created a new :sendError parameter specific for this case

I have also attached a new documentation article (that might act as an alternative to the commit )
                
> Provide error handling for POST operations
> ------------------------------------------
>
>                 Key: SLING-2156
>                 URL: https://issues.apache.org/jira/browse/SLING-2156
>             Project: Sling
>          Issue Type: New Feature
>          Components: Servlets
>            Reporter: Antonio Sanso
>         Attachments: SLING-2156-patch.txt, SLING-2156-patch.txt, SLING-2156-patch.txt, SLING-2156-patch.txt, post_error_handling
>
>
> The error handling mechanism described here [0] doesn't seem to apply also to POST operations.
> If an error occurs while posting a resource to repository (e.g. avax.jcr.nodetype.ConstraintViolationException: no matching property definition found for) the HtmlResponse.html template is rendered.
> This  can also represent a security issue since information as REFERRER/technology stack are shown.
> IMHO this page should be at least configurable (if the mechanism in [0] doesn't suite here).
> [0] http://sling.apache.org/site/errorhandling.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (SLING-2156) Provide error handling for POST operations

Posted by "Antonio Sanso (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-2156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13072304#comment-13072304 ] 

Antonio Sanso commented on SLING-2156:
--------------------------------------

thinking out loud here, filter or not filter, this would require a change to the signature of SlingPostServlet#doPost from:

  protected void doPost(SlingHttpServletRequest request,
            SlingHttpServletResponse response) throws  IOException {

to

  protected void doPost(SlingHttpServletRequest request,
            SlingHttpServletResponse response) throws ServletException,IOException {

that is compatible with the super class.

Once this is done should be easy (having the behavior configurable) to leverage the existing error handling mechanism.

> Provide error handling for POST operations
> ------------------------------------------
>
>                 Key: SLING-2156
>                 URL: https://issues.apache.org/jira/browse/SLING-2156
>             Project: Sling
>          Issue Type: New Feature
>          Components: Servlets
>            Reporter: Antonio Sanso
>
> The error handling mechanism described here [0] doesn't seem to apply also to POST operations.
> If an error occurs while posting a resource to repository (e.g. avax.jcr.nodetype.ConstraintViolationException: no matching property definition found for) the HtmlResponse.html template is rendered.
> This  can also represent a security issue since information as REFERRER/technology stack are shown.
> IMHO this page should be at least configurable (if the mechanism in [0] doesn't suite here).
> [0] http://sling.apache.org/site/errorhandling.html

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (SLING-2156) Provide error handling for POST operations

Posted by "Justin Edelson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-2156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13072398#comment-13072398 ] 

Justin Edelson commented on SLING-2156:
---------------------------------------

OK. This particular issue, however, is a bit broader as you need the ability to provide a custom implementation of PostResponse (I think).

Proposed patch here: http://codereview.appspot.com/4826051

You would need to implement the PostResponseCreator interface in a service and return the appropriate overridden version of HtmlResponse.

Can also be used to solve SLING-1974, but doesn't in and of itself.

> Provide error handling for POST operations
> ------------------------------------------
>
>                 Key: SLING-2156
>                 URL: https://issues.apache.org/jira/browse/SLING-2156
>             Project: Sling
>          Issue Type: New Feature
>          Components: Servlets
>            Reporter: Antonio Sanso
>
> The error handling mechanism described here [0] doesn't seem to apply also to POST operations.
> If an error occurs while posting a resource to repository (e.g. avax.jcr.nodetype.ConstraintViolationException: no matching property definition found for) the HtmlResponse.html template is rendered.
> This  can also represent a security issue since information as REFERRER/technology stack are shown.
> IMHO this page should be at least configurable (if the mechanism in [0] doesn't suite here).
> [0] http://sling.apache.org/site/errorhandling.html

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (SLING-2156) Provide error handling for POST operations

Posted by "Antonio Sanso (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SLING-2156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13163581#comment-13163581 ] 

Antonio Sanso commented on SLING-2156:
--------------------------------------

Hi Ben,

Justin patch has been already committed as for SLING-2223.

This ticket might be complementary to that.
                
> Provide error handling for POST operations
> ------------------------------------------
>
>                 Key: SLING-2156
>                 URL: https://issues.apache.org/jira/browse/SLING-2156
>             Project: Sling
>          Issue Type: New Feature
>          Components: Servlets
>            Reporter: Antonio Sanso
>         Attachments: SLING-2156-patch.txt, SLING-2156-patch.txt, SLING-2156-patch.txt, SLING-2156-patch.txt, post_error_handling
>
>
> The error handling mechanism described here [0] doesn't seem to apply also to POST operations.
> If an error occurs while posting a resource to repository (e.g. avax.jcr.nodetype.ConstraintViolationException: no matching property definition found for) the HtmlResponse.html template is rendered.
> This  can also represent a security issue since information as REFERRER/technology stack are shown.
> IMHO this page should be at least configurable (if the mechanism in [0] doesn't suite here).
> [0] http://sling.apache.org/site/errorhandling.html

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (SLING-2156) Provide error handling for POST operations

Posted by "Antonio Sanso (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-2156?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Antonio Sanso updated SLING-2156:
---------------------------------

    Attachment:     (was: SLING-2156-patch.txt)

> Provide error handling for POST operations
> ------------------------------------------
>
>                 Key: SLING-2156
>                 URL: https://issues.apache.org/jira/browse/SLING-2156
>             Project: Sling
>          Issue Type: New Feature
>          Components: Servlets
>            Reporter: Antonio Sanso
>
> The error handling mechanism described here [0] doesn't seem to apply also to POST operations.
> If an error occurs while posting a resource to repository (e.g. avax.jcr.nodetype.ConstraintViolationException: no matching property definition found for) the HtmlResponse.html template is rendered.
> This  can also represent a security issue since information as REFERRER/technology stack are shown.
> IMHO this page should be at least configurable (if the mechanism in [0] doesn't suite here).
> [0] http://sling.apache.org/site/errorhandling.html

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira