[mirrorbrain-commits] r7890 - /trunk/mirrordoctor/mb/conn.py

From: <poeml_at_mirrorbrain.org>
Date: Wed, 02 Dec 2009 01:04:12 -0000
Author: poeml
Date: Wed Dec  2 02:04:11 2009
New Revision: 7890

URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain?rev=7890&view=rev
Log:
mb: when passwords contain double quotes, issue a warning, because we can't
use them (see http://mirrorbrain.org/issues/issue27)

Modified:
    trunk/mirrordoctor/mb/conn.py

Modified: trunk/mirrordoctor/mb/conn.py
URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain/trunk/mirrordoctor/mb/conn.py?rev=7890&r1=7889&r2=7890&view=diff
==============================================================================
--- trunk/mirrordoctor/mb/conn.py (original)
+++ trunk/mirrordoctor/mb/conn.py Wed Dec  2 02:04:11 2009
_at_@ -1,5 +1,6 @@
 
 import sys
+import mberr
 from sqlobject import *
 
 
_at_@ -101,6 +102,8 @@
             config['dbpass'] = config['dbpass'].replace(' ', r'\ ')
             config['dbpass'] = config['dbpass'].replace('\t', '\\\t')
             config['dbpass'] = config['dbpass'].replace("'", r"\'")
+            if '"' in config['dbpass']:
+                sys.exit('Sorry, but passwords cannot contain double quotes.')
         elif dbdriver in ['mysql']:
             dbport = '3306'
         else:




_______________________________________________
mirrorbrain-commits mailing list
Archive: http://mirrorbrain.org/archive/mirrorbrain-commits/

Note: To remove yourself from this list, send a mail with the content
 	unsubscribe
to the address mirrorbrain-commits-request_at_mirrorbrain.org
Received on Wed Dec 02 2009 - 01:04:14 GMT

This archive was generated by hypermail 2.3.0 : Mon Feb 20 2012 - 23:47:04 GMT