openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #12735
[Merge] lp:~raoul-snyman/openlp/bug-886989 into lp:openlp
Raoul Snyman has proposed merging lp:~raoul-snyman/openlp/bug-886989 into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
Related bugs:
Bug #886989 in OpenLP: "Crashes on non-alphanumeric characters in MySQL password"
https://bugs.launchpad.net/openlp/+bug/886989
For more details, see:
https://code.launchpad.net/~raoul-snyman/openlp/bug-886989/+merge/81607
Fixed bug #886989: automatically encode password (and other fields) when passing it to SQLAlchemy.
--
https://code.launchpad.net/~raoul-snyman/openlp/bug-886989/+merge/81607
Your team OpenLP Core is requested to review the proposed merge of lp:~raoul-snyman/openlp/bug-886989 into lp:openlp.
=== modified file 'openlp/core/lib/db.py'
--- openlp/core/lib/db.py 2011-09-11 20:39:33 +0000
+++ openlp/core/lib/db.py 2011-11-08 16:59:59 +0000
@@ -29,6 +29,7 @@
"""
import logging
import os
+from urllib import quote_plus as urlquote
from PyQt4 import QtCore
from sqlalchemy import Table, MetaData, Column, types, create_engine
@@ -193,10 +194,10 @@
AppLocation.get_section_data_path(plugin_name), plugin_name)
else:
self.db_url = u'%s://%s:%s@%s/%s' % (db_type,
- unicode(settings.value(u'db username').toString()),
- unicode(settings.value(u'db password').toString()),
- unicode(settings.value(u'db hostname').toString()),
- unicode(settings.value(u'db database').toString()))
+ urlquote(unicode(settings.value(u'db username').toString())),
+ urlquote(unicode(settings.value(u'db password').toString())),
+ urlquote(unicode(settings.value(u'db hostname').toString())),
+ urlquote(unicode(settings.value(u'db database').toString())))
settings.endGroup()
if upgrade_mod:
db_ver, up_ver = upgrade_db(self.db_url, upgrade_mod)
Follow ups