hussein-awala commented on PR #36000: URL: https://github.com/apache/airflow/pull/36000#issuecomment-1837113368
> We should only allow fixed set of placeholders - not a "Free placeholder" = only alow "%s" or "?" - nothing else. > > The problem with such an input provided by the user who can configure a connection from the UI, that by allowing "ANY" values, it opens up the doors to all kind of vulnerabilities - similar to SQL INJECTION. > > So we should always sanitize any input passed down from the user when such conection is defined via UI. > > While we cannot prevent existing cases and some kinds of "inherent" vulnerabilities in some connection types, adding a gateway to such "user input" (even if we do not know if it can be exploited) is dangerous. > > In this case I think "?" and "%s" are the only "reasonable" values placeholder can take and we should validate if user value is exactly one of those.. > > Maybe there are others that we might find and add, but adding a possibility of using ANY placeholder provided by the user here is too dangerous IMHO. Makes sense! We can achieve this easily by adding a list of whitelisted placeholders in each provider, and checking if the provided placeholder exists in this list. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
