diff --git a/doc/conf.py b/doc/conf.py index b337042cc..44f06ec80 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -50,7 +50,7 @@ copyright = u'2014, Antoine Nguyen' # The short X.Y version. version = '1.2' # The full version, including alpha/beta/rc tags. -release = '1.2.0' +release = '1.2.1' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/modoboa/core/models.py b/modoboa/core/models.py index 93df9a416..80b77bb15 100644 --- a/modoboa/core/models.py +++ b/modoboa/core/models.py @@ -90,6 +90,7 @@ class User(PermissionsMixin): for ooentry in self.objectaccess_set.filter(is_owner=True): if ooentry.content_object is not None: grant_access_to_object(owner, ooentry.content_object, True) + ungrant_access_to_object(ooentry.content_object, self) events.raiseEvent("AccountDeleted", self, fromuser, **kwargs) ungrant_access_to_object(self) diff --git a/modoboa/lib/form_utils.py b/modoboa/lib/form_utils.py index da18fa26b..c52a94a39 100644 --- a/modoboa/lib/form_utils.py +++ b/modoboa/lib/form_utils.py @@ -344,17 +344,19 @@ class TabForms(object): # -def is_valid_host(host): - """IDN compatible domain validator.""" - host = host.encode('idna').lower() - if not hasattr(is_valid_host, '_re'): - is_valid_host._re = re.compile( - r'^([0-9a-z][-\w]*[0-9a-z]\.)+[a-z0-9\-]{2,15}$') - return bool(is_valid_host._re.match(host)) +def is_valid_hostname(hostname): + """Domain name validaton.""" + if len(hostname) > 255: + return False + if hostname[-1] == ".": + hostname = hostname[:-1] # strip exactly one dot from the + # right, if present + allowed = re.compile(r"(?!-)[A-Z\d-]{1,63}(? + + {% trans "Welcome to Modoboa" %} diff --git a/setup.py b/setup.py index d1726d0a4..9e950373e 100644 --- a/setup.py +++ b/setup.py @@ -54,7 +54,7 @@ def read(fname): setup( name="modoboa", - version='1.2.0', + version='1.2.1', url='http://modoboa.org/', license='MIT', description="Mail hosting made simple",