From e8cf50326d5be1ce0773aabcff7bc9322676c564 Mon Sep 17 00:00:00 2001 From: Jose de Soto Date: Wed, 13 Sep 2017 11:21:03 +0200 Subject: [PATCH 1/4] When profile is updated self._update_session_user(user) set session.user_groups to None. self.update_groups() needs to be done. --- gluon/tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gluon/tools.py b/gluon/tools.py index 0cf9b205..8eeab12a 100644 --- a/gluon/tools.py +++ b/gluon/tools.py @@ -3777,9 +3777,9 @@ class Auth(AuthAPI): if any(f.compute for f in extra_fields): user = table_user[self.user.id] self._update_session_user(user) + self.update_groups() else: self.user.update(table_user._filter_fields(form.vars)) - session.flash = self.messages.profile_updated self.log_event(log, self.user) callback(onaccept, form) From 5f4c47729b3d2b9be74d1b2c5ff5291c838739b0 Mon Sep 17 00:00:00 2001 From: Jose de Soto <1744837+josedesoto@users.noreply.github.com> Date: Thu, 21 Sep 2017 10:17:17 +0200 Subject: [PATCH 2/4] Removed a tab and replaced by spaces --- gluon/tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gluon/tools.py b/gluon/tools.py index 8eeab12a..a0373745 100644 --- a/gluon/tools.py +++ b/gluon/tools.py @@ -3777,7 +3777,7 @@ class Auth(AuthAPI): if any(f.compute for f in extra_fields): user = table_user[self.user.id] self._update_session_user(user) - self.update_groups() + self.update_groups() else: self.user.update(table_user._filter_fields(form.vars)) session.flash = self.messages.profile_updated From 12253ab757538312b1adcc37998fbc2910090394 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonel=20C=C3=A2mara?= Date: Mon, 13 Nov 2017 15:31:05 +0000 Subject: [PATCH 3/4] Fix #1715 --- gluon/globals.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gluon/globals.py b/gluon/globals.py index cb52d331..b4344f0f 100644 --- a/gluon/globals.py +++ b/gluon/globals.py @@ -220,7 +220,12 @@ class Request(Storage): if is_json: try: - json_vars = json_parser.load(body) + # In Python 3 versions prior to 3.6 load doesn't accept bytes and + # bytearray, so we read the body convert to native and use loads + # instead of load. + # This line can be simplified to json_vars = json_parser.load(body) + # if and when we drop support for python versions under 3.6 + json_vars = json_parser.loads(to_native(body.read())) except: # incoherent request bodies can still be parsed "ad-hoc" json_vars = {} From e44a12eaf8147cefbbea2a37c6257303ed4673bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonel=20C=C3=A2mara?= Date: Mon, 13 Nov 2017 22:40:37 +0000 Subject: [PATCH 4/4] Update supported python versions --- .../private/content/en/default/what/whyweb2py.markmin | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/applications/examples/private/content/en/default/what/whyweb2py.markmin b/applications/examples/private/content/en/default/what/whyweb2py.markmin index e4337a59..358a81c0 100644 --- a/applications/examples/private/content/en/default/what/whyweb2py.markmin +++ b/applications/examples/private/content/en/default/what/whyweb2py.markmin @@ -3,9 +3,9 @@ - **Created by a community of professionals** and University professors in Computer Science and Software Engineering. - **Always backward compatible.** We have not broken backward compatibility since version 1.0 in 2007, and we pledge not to break it in the future. - **Easy to run.** It requires no installation and no configuration. -- **Runs on** Windows, Mac, Unix/Linux, Google App Engine, Amazon EC2, and almost any web hosting via Python 2.5/2.6/2.7/pypy, or Java with Jython. -- **Runs with** Apache, Lighttpd, Cherokee and almost any other web server via CGI, FastCGI, WSGI, mod_proxy, and/or mod_python. It can embed third party WSGI apps and middleware. -- **Talks to** SQLite, PostgreSQL, MySQL, MSSQL, FireBird, Oracle, IBM DB2, Informix, Ingres, and Google App Engine. +- **Runs on** Windows, Mac, Unix/Linux, Google App Engine, Amazon EC2, and almost any web hosting via Python 2.7/3.5/3.6/pypy. +- **Runs with** Apache, Nginx, Lighttpd, Cherokee and almost any other web server via CGI, FastCGI, WSGI, mod_proxy, and/or mod_python. It can embed third party WSGI apps and middleware. +- **Talks to** SQLite, PostgreSQL, MySQL, MSSQL, FireBird, Sybase, Oracle, IBM DB2, Informix, Ingres, MongoDB, and Google App Engine. - **Secure** [[It prevents the most common types of vulnerabilities http://web2py.com/examples/default/security]] including Cross Site Scripting, Injection Flaws, and Malicious File Execution. - **Enforces good Software Engineering practices** (Model-View-Controller design, Server-side form validation, postbacks) that make the code more readable, scalable, and maintainable. - **Speaks multiple protocols** HTML/XML, RSS/ATOM, RTF, PDF, JSON, AJAX, XML-RPC, CSV, REST, WIKI, Flash/AMF, and Linked Data (RDF).