|
Re: Hiding Stack Traces / Errors [message #792334 is a reply to message #790920] |
Mon, 06 February 2012 22:23 |
|
I have not seen a bug logged for this yet. You do have the option of
clearing the error message using a script tag in a text element:
<script language="JavaScript">
document.getElementById('error_icon0_0').parentNode.parentNode.parentNode.style.display
= "none";
</script>
or forward to another page on error like:
<script language="JavaScript">
var tst=<VALUE-OF>_jsContext.hasErrors()</VALUE-OF>
if( tst == true ){
window.location = "http://www.google.com";
}
</script>
Jason
On 2/4/2012 9:21 PM, Shayne Paddock wrote:
> Is there a way to hide all BIRT stack traces? I'm running BIRT 3.7.1
>
> I changed the messages properties to at least not display the report
> path and filename in the error messages but I really want to Hide all
> error messages. It's a security concern that I'd like to close.
>
> A while back Jason W. was going to / or have somebody log a bug about
> this. He was suggesting an option in web.xml I looked through the new
> web.xml and didn't see any switches that looked like they addressed it.
>
>
> Kindest regards,
> Shayne
|
|
|
|
Re: Hiding Stack Traces / Errors [message #792343 is a reply to message #792337] |
Mon, 06 February 2012 22:38 |
|
I believe a 500 is returned if there is an error in the viewer code
itself, but not the individual report. If you look a the BirtUtility
class in the viewer there is a function called
BirtUtility.appendErrorMessage which actually adds the error to the
report. You could always change this function to do something different.
Jason
On 2/6/2012 5:30 PM, Shayne Paddock wrote:
> If the check is done in javascript then the hacker would already have
> the stack trace in his browser. Not to mention if you turn javascript
> off it would get around that check would it not?
>
> Also, we noticed that when stack traces are returned BIRT returns error
> code 200's which mean everything is OK. Is there a reason why BIRT can't
> return 500 level errors?
>
>
> Kindest regards,
> Shayne
|
|
|
|
Re: Hiding Stack Traces / Errors [message #792364 is a reply to message #792349] |
Mon, 06 February 2012 23:10 |
|
That will only handle the stack trace in the report display. To take
care of message box, you could remove the dialog from the jsp fragment
but that would not prevent the error from actually streaming back. It
just would not display it. This error box is populated using the
results from an AJAX web service call to the server. In the
ReportEngineService.java class there is a method:
private void throwDummyException( Exception e ) throws DummyRemoteException
{
if ( e instanceof ReportServiceException )
{
throw new DummyRemoteException( e );
}
else
{
throw new DummyRemoteException( new ReportServiceException(
e.getLocalizedMessage( ),
e ) );
}
}
Which I believe is passing back the exception to the client. You could
change this method.
Jason
On 2/6/2012 5:46 PM, Shayne Paddock wrote:
> Would that solution solve the javascript dialog boxes when you have a
> validate Parameter method that fails and the invalid parameter pop up
> has a show stack trace button?
>
> Kindest regards,
> Shayne
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03980 seconds