Hi there,

I have an Apache with mod_python running Trac on my local machine.  
PythonDebug is set to Off. I shut the database server down. Then I 
navigate to my local Trac URL and get a traceback in the browser, 
displaying all the paths, server names, port numbers, etc.

Not a good situation if happens on a production server, huh?

First I thought this was a mod_python problem, but it is Trac's.

In the trac/web/api.py file, send_error function (line 373) 
unconditionally sends the traceback down to the client.

I couldn't think of anything better than this:

@@ -371,7 +371,10 @@
                                              data.get('type'),
                                              data.get('message'))
         except: # failed to render
-            data = get_last_traceback()
+            import logging
+            logging.exception('An exception occured during rendering 
the error page')
+            #data = get_last_traceback()
+            data = "A serious server error occured. Please tell the 
developers you have seen this message."
             content_type = 'text/plain'
 
         self.send_response(status)

Is there a better solution that? Am I missing something?

If not, would you guys like me to create a ticket?


Regards,
Mike


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac 
Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/trac-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to