From 580d5f00c9af65e2ff8cbe6e560270a9d6b7e97d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonel=20C=C3=A2mara?= Date: Mon, 19 Jan 2015 23:50:39 +0000 Subject: [PATCH 1/3] Make app_cleanup use recursive_unlink to clean the cache folder. This fixes a bug with the admin cleaning of an app seen here: https://groups.google.com/d/msg/web2py/YMpbAlMLln8/VFuY_xQ7WFYJ --- gluon/admin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gluon/admin.py b/gluon/admin.py index 527c9665..d6834e6c 100644 --- a/gluon/admin.py +++ b/gluon/admin.py @@ -121,7 +121,7 @@ def app_cleanup(app, request): if os.path.exists(path): for f in os.listdir(path): try: - if f[:1] != '.': os.unlink(os.path.join(path, f)) + if f[:1] != '.': recursive_unlink(os.path.join(path, f)) except IOError: r = False return r From acab0ad2315bfca2caf9848f6ca3f6462f994b66 Mon Sep 17 00:00:00 2001 From: Michele Comitini Date: Wed, 21 Jan 2015 01:39:07 +0100 Subject: [PATCH 2/3] auth.settings.*_case_sensitivity support for password retrieval --- gluon/tools.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gluon/tools.py b/gluon/tools.py index 2067e877..33267b83 100644 --- a/gluon/tools.py +++ b/gluon/tools.py @@ -3097,10 +3097,15 @@ class Auth(object): IS_EMAIL(error_message=self.messages.invalid_email), IS_IN_DB(self.db, table_user.email, error_message=self.messages.invalid_email)] + if not self.settings.email_case_sensitive: + table_user.email.requires.insert(0, IS_LOWER()) else: table_user.username.requires = [ IS_IN_DB(self.db, table_user.username, error_message=self.messages.invalid_username)] + if not self.settings.username_case_sensitive: + table_user.username.requires.insert(0, IS_LOWER()) + form = SQLFORM(table_user, fields=[userfield], hidden=dict(_next=next), From d6b4ae828cbca44bb6c1ea45aabc2b768facc0bf Mon Sep 17 00:00:00 2001 From: Kristofor Varhus Date: Wed, 21 Jan 2015 09:39:09 -0500 Subject: [PATCH 3/3] DAL imports portalocker from gluon to avoid conflict with another portalocker module --- gluon/dal/_load.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gluon/dal/_load.py b/gluon/dal/_load.py index 5aad2206..d17db18a 100644 --- a/gluon/dal/_load.py +++ b/gluon/dal/_load.py @@ -19,7 +19,7 @@ except (ImportError, SystemError): def web2py_uuid(): return str(uuid.uuid4()) try: - import portalocker + from gluon import portalocker have_portalocker = True except ImportError: portalocker = None