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 @@ -1,5 +1,6 @@ import sys +import mberr from sqlobject import * @@ -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.orgReceived on Wed Dec 02 2009 - 01:04:14 GMT
This archive was generated by hypermail 2.2.0 : Wed Dec 02 2009 - 01:45:49 GMT