Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Does fatalsToBrowser give too much information to a cracker?

by Seumas (Curate)
on Apr 10, 2002 at 19:57 UTC ( [id://158125]=note: print w/replies, xml ) Need Help??


in reply to Does fatalsToBrowser give too much information to a cracker?

I prefer not to use fatalsToBrowser in production because I don't want to expose paths, file names or specific errors to users. I sometimes use it in development, but find that tailing my server logs in another window is just as easy.

In my current project, I use cluck() to send a stack trace and error to my server logs when something goes wrong and just print out a generic error to my users. For my purposes, I don't need them to know what the specific problem is (it probably won't help them to know if it's a database error as opposed to a code error, for example).

Here's a crude example of what I currently use. I'm sure there are a number of far better solutions, but this seems to work for me right now (and I'm still developing my debugging/error-reporting/error-handling skills):

sub ErrorHandler { if ($DBI::errstr) { cluck("The following database error occurred:\n $DBI::errstr") +; print "Error message to display to your users."; } else { cluck "An error has occurred"; print "Error message to display to your users."; } }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://158125]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (5)
As of 2024-04-16 06:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found