You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Otavio Rodolfo Piske (Jira)" <ji...@apache.org> on 2020/11/09 15:51:00 UTC

[jira] [Work started] (CAMEL-15833) camel-aws2-sqs: create queue logic is susceptible to TOC/TOU errors

     [ https://issues.apache.org/jira/browse/CAMEL-15833?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on CAMEL-15833 started by Otavio Rodolfo Piske.
----------------------------------------------------
> camel-aws2-sqs: create queue logic is susceptible to TOC/TOU errors
> -------------------------------------------------------------------
>
>                 Key: CAMEL-15833
>                 URL: https://issues.apache.org/jira/browse/CAMEL-15833
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-aws2
>    Affects Versions: 3.4.4, 3.6.0
>            Reporter: Otavio Rodolfo Piske
>            Assignee: Otavio Rodolfo Piske
>            Priority: Major
>
> The AWS v2 SQS component has a time-of-check / time-of-use bug when creating queues. Currently, the code [checks if the queue exists and, if not, creates it|https://github.com/apache/camel/blob/828a99183f08b4ea609a765837c668b9aba21faa/components/camel-aws2-sqs/src/main/java/org/apache/camel/component/aws2/sqs/Sqs2Endpoint.java#L192].
> However, if another application or thread creates the queue in between the check and the creation, the component fails and the startup is aborted.
>  
> IMHO, a better approach would be to - in case of an exception - check if the queue hasn't been created before aborting.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)