[damned-lies] Improve display of error messages (and prevent path divulgation)



commit f4750511149077b01e82c09c2c0c3afc82098f83
Author: Claude Paroz <claude 2xlibre net>
Date:   Thu May 12 16:00:55 2011 +0200

    Improve display of error messages (and prevent path divulgation)

 media/css/main.css |    4 ++++
 stats/utils.py     |    2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/media/css/main.css b/media/css/main.css
index b6b2a63..d08eaf2 100644
--- a/media/css/main.css
+++ b/media/css/main.css
@@ -1,3 +1,7 @@
+pre {
+  white-space: pre-wrap;
+}
+
 table.stats {
   width: 100%;
 }
diff --git a/stats/utils.py b/stats/utils.py
index f812f1e..e4a6780 100644
--- a/stats/utils.py
+++ b/stats/utils.py
@@ -207,7 +207,7 @@ def generate_doc_pot_file(vcs_path, potbase, moduleid, verbose):
         errors.append(("error",
                        ugettext_noop("Error regenerating POT file for document %(file)s:\n<pre>%(cmd)s\n%(output)s</pre>")
                              % {'file': potbase,
-                                'cmd': command,
+                                'cmd': command.replace(settings.SCRATCHDIR, "&lt;scratchdir&gt;"),
                                 'output': errs})
                      )
         potfile = ""



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]