diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-04-21 14:19:05 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-04-21 14:19:05 +0200 |
| commit | a0ff1f2ad845a3d9359bdcb8f9861b18cbe40bf5 (patch) | |
| tree | 79089b3c6bd3c22a62fc194fe099a707adbabecb /addons/web/controllers/main.py | |
| parent | 3724d85904dead0f865d92f4d1c9b303daed5c8e (diff) | |
| parent | 8de514f8059a1eccf054c4df24bf420e06b9a3a4 (diff) | |
[MERGE] forward port branch 9.0 up to 8de514f8059
Diffstat (limited to 'addons/web/controllers/main.py')
| -rw-r--r-- | addons/web/controllers/main.py | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index 5ff1cae6e8e..c209cdfdff9 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -636,8 +636,6 @@ class Database(http.Controller): @http.route('/web/database/create', type='http', auth="none", methods=['POST'], csrf=False) def create(self, master_pwd, name, lang, password, **post): try: - if not re.match('^[a-zA-Z][a-zA-Z0-9_]+$', name): - raise Exception(_('Invalid database name. Only alphanumerical characters and underscore are allowed.')) # country code could be = "False" which is actually True in python country_code = post.get('country_code') or False request.session.proxy("db").create_database(master_pwd, name, bool(post.get('demo')), lang, password, post['login'], country_code) @@ -650,8 +648,6 @@ class Database(http.Controller): @http.route('/web/database/duplicate', type='http', auth="none", methods=['POST'], csrf=False) def duplicate(self, master_pwd, name, new_name): try: - if not re.match('^[a-zA-Z][a-zA-Z0-9_]+$', new_name): - raise Exception(_('Invalid database name. Only alphanumerical characters and underscore are allowed.')) request.session.proxy("db").duplicate_database(master_pwd, name, new_name) return http.local_redirect('/web/database/manager') except Exception, e: |
