From ec8d9a37148b12ee40842bb958ee9c0548616687 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Fri, 11 Jan 2013 09:02:22 -0600 Subject: [PATCH] fixed issue with hiding password, thanks Niphlod --- VERSION | 2 +- gluon/dal.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index 5f7f56c7..b1800cab 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.4.1-alpha.2+timestamp.2013.01.10.23.15.01 +Version 2.4.1-alpha.2+timestamp.2013.01.11.09.01.31 diff --git a/gluon/dal.py b/gluon/dal.py index 08e6cb7d..b7bd6f78 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -447,7 +447,7 @@ def pluralize(singular, rules=PLURALIZE_RULES): if plural: return plural def hide_password(uri): - return REGEX_PASSWORD.sub('://******:',uri) + return REGEX_NOPASSWD.sub('******',uri) def OR(a,b): return a|b @@ -6884,7 +6884,7 @@ class DAL(object): for db in db_group: if not db._uri: continue - k = REGEX_NOPASSWD.sub('******',db._uri) + k = hide_password(db._uri) infos[k] = dict(dbstats = [(row[0], row[1]) for row in db._timings], dbtables = {'defined': sorted(list(set(db.tables) -