[IMP] service: convert uid to int

Make sure the user id received by the RPC call is an integer

Avoids errors like #23534
Crash early in case of bad uid format instead of propagating another value
This commit is contained in:
Martin Trigaux
2018-03-22 09:00:00 +01:00
committed by GitHub
parent 76027a6e12
commit 168b3490cd
+1 -1
View File
@@ -21,7 +21,7 @@ PG_CONCURRENCY_ERRORS_TO_RETRY = (errorcodes.LOCK_NOT_AVAILABLE, errorcodes.SERI
MAX_TRIES_ON_CONCURRENCY_FAILURE = 5
def dispatch(method, params):
(db, uid, passwd ) = params[0:3]
(db, uid, passwd ) = params[0], int(params[1]), params[2]
# set uid tracker - cleaned up at the WSGI
# dispatching phase in odoo.service.wsgi_server.application