From 168b3490cdc40bd9e0da4e79cca39a07b1ae8296 Mon Sep 17 00:00:00 2001 From: Martin Trigaux <564822+mart-e@users.noreply.github.com> Date: Thu, 22 Mar 2018 09:00:00 +0100 Subject: [PATCH] [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 --- odoo/service/model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odoo/service/model.py b/odoo/service/model.py index e263a581be2..25f6dee3854 100644 --- a/odoo/service/model.py +++ b/odoo/service/model.py @@ -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