From 5fae84cbd01d794a174b7606752de350ea2ccfda Mon Sep 17 00:00:00 2001 From: Neil Williams Date: Wed, 12 Feb 2014 21:16:39 -0800 Subject: [PATCH] Put media_domain warning on stderr to protect MR jobs. For simple installs of reddit, g.domain == g.media_domain. If this is the case, the app will print a warning at startup. However, this warning was printed to stdout which meant that any jobs (such as the mr_top stuff) using the output of a reddit process would get this warning in their data streams. Bad times. --- r2/r2/lib/app_globals.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r2/r2/lib/app_globals.py b/r2/r2/lib/app_globals.py index 64f6287a5..87bf0e49c 100755 --- a/r2/r2/lib/app_globals.py +++ b/r2/r2/lib/app_globals.py @@ -424,7 +424,7 @@ class Globals(object): if not self.media_domain: self.media_domain = self.domain if self.media_domain == self.domain: - print ("Warning: g.media_domain == g.domain. " + + print >> sys.stderr, ("Warning: g.media_domain == g.domain. " + "This may give untrusted content access to user cookies") for arg in sys.argv: