Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

Send exception message as reason on client error #611

Merged
merged 1 commit into from Oct 30, 2012

Conversation

adreghiciu
Copy link
Contributor

Signed-off-by: Alin Dreghiciu adreghiciu@gmail.com

Signed-off-by: Alin Dreghiciu <adreghiciu@gmail.com>
@cstamas
Copy link
Contributor

cstamas commented Oct 24, 2012

+100

And same should be done for

org.sonatype.nexus.rest.artifact.AbstractArtifactPlexusResource.handleException(Request, Response, Throwable)

That is actually dupe of this here (handle method)

@peterlynch
Copy link
Member

Like the idea but...

What assurance do we have an exception message does not contain content we do not want to send to client?

Also at what layer are these messages escaped? Restlet handles it automatically?

@adreghiciu
Copy link
Contributor Author

@peterlynch we will see what messages are out there
I dunno about escaping.

@peterlynch
Copy link
Member

an option might be to make it configurable to include exception message in status, default off - until we have some better way to determine this does not expose some information we shouldn't

not sure how useful then this becomes.

@jdillon
Copy link
Contributor

jdillon commented Oct 24, 2012

jsoup can probably sanitize if needed:

http://jsoup.org/cookbook/cleaning-html/whitelist-sanitizer

@jdillon
Copy link
Contributor

jdillon commented Oct 24, 2012

Generally I think this is good, so +1, but I do share concerns about the message content... but eh, probably only one way to really find out if its sending appropriate content or not ;-)

@cstamas
Copy link
Contributor

cstamas commented Oct 30, 2012

Escaping is already handled by NexusStatusService, as that is the restlet component rendering these pages.

About the content, "The proof of the pudding"... so merge this

adreghiciu added a commit that referenced this pull request Oct 30, 2012
Send exception message as reason on client error
@adreghiciu adreghiciu merged commit 95459bf into master Oct 30, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants