How to avoid SQL INJECTION in Google Ads API using Python?

78 views
Skip to first unread message

Luiz Eduardo Da Cruz

unread,
Dec 23, 2022, 1:42:23 PM12/23/22
to Google Ads API and AdWords API Forum
Hello, how are you?

I searched some forums about how to prevent sql injection in python and saw that there are ways to use a code like the following:

nome = "'Carlos' , idade = 80" cursor.execute("UPDATE cliente SET nome=%(nome)s WHERE idcliente=13", ({'nome': nome, }))


Most of the examples I see the variable 'cursor.execute' and an execute next to it, I would like to know how to replicate this in the Google ads API.

Google Ads API Forum Advisor

unread,
Dec 27, 2022, 10:42:11 AM12/27/22
to adwor...@googlegroups.com
Hello,

Thanks for reaching out. Your inquiry seems to be specific to the Python client library. Please reach out to the Python client library owners, here.

Regards,

Google Logo
Matt
Google Ads API Team
 


ref:_00D1U1174p._5004Q2hNKvH:ref
Reply all
Reply to author
Forward
0 new messages