Commit Graph
213 Commits
Author SHA1 Message Date
Cédric Krier 1c32a02b64 Simplify API for Session
- Allow to extend session management with a domain
- Let security manage the logging
- Let check differentiate expired session and session that does not exist

issue7134
review39171002
2018-03-07 00:34:09 +01:00
Cédric Krier 7388e7b233 Add '_request' attribute to Transaction context
issue7110
review41031002
2018-02-14 19:22:03 +01:00
Cédric Krier 5a1bc137a3 Add a maximum size for request
issue6619
review38441002
2017-09-03 11:32:17 +02:00
brunnenschacht cb2d234230 Ensure the proper encoding for the authentication header response
issue6628
review36441002
2017-07-13 09:19:08 +02:00
Cédric Krier 1c92359998 Decode username only if it is bytes
The decoding is only needed on Python2 because bytes_to_wsgi returns always a
str but str on Python2 is not unicode.

issue6578
review41381002
2017-06-18 15:24:05 +02:00
Cédric Krier d1a971fb61 Decode username before logging it
The username of request authorisation is bytes encoded in UTF-8.
The logging module tries to decode it as ASCII by default.

issue6517
review34991002
2017-05-30 22:07:46 +02:00
Cédric Krier e7ff9ee619 Use compact separators to dump json
issue6373
review33991002
2017-03-23 22:51:36 +01:00
Cédric Krier 05972ae818 Add exception as description of internal error of user_application
issue6255
review29991002
2017-02-14 23:37:16 +01:00
Sergi Almacellas Abellana 5278085a98 Disable transaction cache for database list
issue6216
review31071002
2017-02-07 17:06:39 +01:00
Cédric Krier cdc5952145 Manage Cache in Transaction
issue6216
review33021002
2017-02-02 12:04:27 +01:00
Cédric Krier afdc884277 Return 429 status when too many login attempts
This prevents to consume too much resource by sleeping over a very long period.

issue6215
review29161002
2017-02-02 11:55:44 +01:00
Cédric Krier 94be12542c Return result after cache reset in with_transaction wrapper
issue6200
review34641002
2017-01-29 01:17:08 +01:00
Cédric Krier c0aa69fa23 Make wsgi app returns Internal Server Error on exception
If no protocol convert the data into a Response and if the data is an exception
it should be returned as an Internal Server Error instead of a succeed
response.
The exception can be used as description for the Internal Server Error.

issue6201
review31951002
2017-01-29 01:11:57 +01:00
Cédric Krier c2b76dd685 Use root user to init pool in with_pool wrapper
All requests do not have necessary a user id, for example request for user
application.

issue6199
review26041002
2017-01-29 01:07:33 +01:00
Cédric Krier f9c0457416 Remove support for simplejson
On Python 3, simplejson has a different behaviour than the stdlib json,
especially for dumping bytes.

issue6010
review33601002
2016-11-05 19:54:12 +01:00
Cédric Krier 965d010dc9 Add user application
issue5782
review28641002
2016-09-27 11:56:19 +02:00
Cédric Krier 3e90ed6675 Abort with 404 on wrong database name
The client must be able to distinct login failure because of wrong database and
failure because of wrong parameters.

issue5837
review32531002
2016-08-31 22:57:23 +02:00
Sergi Almacellas Abellana 5967d21d46 Remove database management from RPC
issue5384
review29311002
2016-07-07 16:05:45 +02:00
Cédric Krier 16f0e84f25 Format the exception inside the try/except
Outside the try/except sys.exc_info returns None values, so we must format the
traceback inside the try/except.

issue5647
review23221002
2016-06-18 12:04:45 +02:00
Cédric Krier 2c390fe71a Add customizable login process
It adds new configuration option to define the list of login methods.
It defines a new Exception to use to request user data during the login
process.
It separates the generic login attempt protection from the actual
authentication method.
It replace the API of the login methods to use a dictionary of parameters
instead of a single password.

issue5521
review16191003
2016-05-31 12:49:23 +02:00
Cédric Krier b08b37423d Decode data before json loads
issue5536
review23041002
2016-05-10 10:19:22 +02:00
Cédric Krier 5b68149ea8 Update translations 2016-05-01 10:59:39 +02:00
Thierry Bruyere 91cd4040fa Database locked at first wizard execution with sqlite backend
Cache.resets create a new transaction but SQLite keeps a lock from the previous
transaction is it was not committed.
This commit was removed by changeset 9b2e0aac2d9c

issue5388
review16211002
2016-04-30 23:26:47 +02:00
Cédric Krier 506552af4e Log as error DatabaseOperationalError exceptions 2016-04-06 23:57:58 +02:00
Cédric Krier 1b33a4b3ed Fix connection leak on postgresql
All connections must be put back to the pool otherwise they will never be
reused and so exhaust the pool limit.

issue5421
review20121002
2016-03-25 10:46:12 +01:00
Cédric Krier c19f93cd9b NotLogged exception is no more used
issue5415
review17971003
2016-03-21 23:39:30 +01:00
Cédric Krier 8a4ba59b2d Switch to WSGI API
issue4646
review20541003
2016-03-15 16:57:26 +01:00
Cédric Krier 49a844013e Missing PEP-0249 for db_exist 2016-03-05 18:33:24 +01:00
Nicolas Évrard 2fef479575 Follow PEP-0249 for Transaction and backends
issue4949
review19781002
2016-03-03 21:51:57 +01:00
Nicolas Évrard 61018dc9b7 Fix wrong test for existing database introduced in changeset 903a52fc1bb2
issue5238
review18861002
2016-02-23 17:40:30 +01:00
Cédric Krier 29129855ec Add support for Python 3
issue3211
review7311002
2016-02-07 16:46:16 +01:00
Sharoon Thomas 89de660c52 Move webdav into a separate module
issue4703
review7101002
2016-01-16 19:20:30 +01:00
Cédric Krier 14d5de6ac9 Add Hungarian
issue4874
review19321002
2015-09-02 13:49:26 +02:00
Cédric Krier a19d1b7614 Use autocommit transaction for webdav
issue4858
review23291002
2015-07-28 07:53:19 +02:00
Cédric Krier f455a9b6ed Add Italian
issue4840
review18331003
2015-07-09 15:41:53 +02:00
Cédric Krier 46e27a8f3e Add Spanish Mexico
issue4813
review12221002
2015-06-22 22:19:01 +02:00
Cédric Krier a51ac59a93 Add Portuguese (Brazil)
issue4125
review8181002
2015-06-22 22:09:20 +02:00
Cédric Krier 52ff97b165 Rename ir.module.module* into ir.module*
issue4764
review7171002
2015-05-28 21:02:01 +02:00
Cédric Krier 34fb7d7471 Drop all cache of a database when it is dropped
issue4584
review11121002
2015-03-25 18:56:52 +01:00
Cédric Krier 01a7cc59a8 Remove execfile from setup.py
issue4654
review15131002
2015-03-19 21:25:20 +01:00
Cédric Krier 611b96c5f0 Add is_instance_method tool compatible with Python3
issue3211
2015-03-18 23:34:55 +01:00
Cédric Krier 31e8634bf4 Fix bytes and bytearray usage
- sqlite can not convert bytearray, must use buffer
- binary value could be stored as unicode
- don't dump bytes as base64 in xmlrpclib if bytes is str
2015-03-16 20:13:03 +01:00
Cédric Krier 5cfde31ed2 Use bytes and bytearray for Binary
issue4637
review11091002
2015-03-16 19:28:34 +01:00
Cédric Krier ad5eb3ed97 Add ModelView.button_change
issue4397
review7781002
2015-03-16 12:56:11 +01:00
Cédric Krier 20484bb013 Fix formatting in logger calls 2015-03-05 11:32:18 +01:00
Cédric Krier 0ac0990c77 Improve logging
issue4458
review11781002
2015-03-02 23:39:15 +01:00
Cédric Krier 0991a552de Add TimeDelta field
And remove float_time widget.

issue4026
review5911002
2015-02-09 22:58:56 +01:00
Cédric Krier 1b0edb06c6 Cache.resets must be executed inside a Transaction
since changeset 01399128964f

issue4448
review13921002
2015-02-04 23:16:53 +01:00
Javier Villarroya bef0afaed6 Use getboolean for database list configuration
Otherwise the false value is still evaluated to true.

issue4404
review14781002
2014-12-16 21:34:29 +01:00
Cédric Krier c144f8c349 Fix most flake8 errors
review8771002
2014-12-02 12:54:01 +01:00