From 1279ca0334e99a1ccc7a3ad195ee10e2f4b7b677 Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Fri, 4 Jul 2014 16:45:41 +0200 Subject: [PATCH] [FIX] hr_holidays: proper parameter passing syntax for raw SQL This instance was not actually exploitable for SQL injection as it is not callable directly via RPC and guarded by other queries when indirectly called. Still plain awful. --- addons/hr_holidays/hr_holidays.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/hr_holidays/hr_holidays.py b/addons/hr_holidays/hr_holidays.py index 6a55403e960..793ab247a2d 100644 --- a/addons/hr_holidays/hr_holidays.py +++ b/addons/hr_holidays/hr_holidays.py @@ -510,8 +510,8 @@ class hr_employee(osv.osv): where h.state='validate' and s.limit=False and - h.employee_id in (%s) - group by h.employee_id"""% (','.join(map(str,ids)),) ) + h.employee_id in %s + group by h.employee_id""", (tuple(ids),)) res = cr.dictfetchall() remaining = {} for r in res: