[
https://issues.apache.org/jira/browse/CAMEL-11912?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Thanos Agelatos updated CAMEL-11912:
------------------------------------
Description:
Most operations on the new Dropbox component (compliant to v2 API of Dropbox)
has a dropbox path validator. It uses this regex (see below).
{noformat}
/*?(\S+)/*?
{noformat}
This regex fails in the following paths:
* "/path with spaces/file" - part of the test suite
* "/Web Projects/caesars entertainment -
us/#ops/one/campaigns/archive/20170919/REN_BIG_PULL_WEEKEND_20170907.csv" - a
real path that in the previous camel version (2.18.2) - v1 API was working.
It seems that modifying the regex to this one below, (again regex form, not
java) makes both paths above get a match.
{noformat}
/*?(\S+)*.+/*?
{noformat}
Please check (http://fiddle.re/f1c4fd) and let me know, patch can be provided
if needed.
was:
Most operations on the new Dropbox component (compliant to v2 API of Dropbox)
has a dropbox path validator. It uses this regex {{/*?(\S+)/*?}} (regex form
here). This regex fails in the following paths:
* "/path with spaces/file" - part of the test suite
* "/Web Projects/caesars entertainment -
us/#ops/one/campaigns/archive/20170919/REN_BIG_PULL_WEEKEND_20170907.csv" - a
real path that in the previous camel version (2.18.2) - v1 API was working.
It seems that modifying the regex to this {{/*?(\S+)*.+/*?}} (again regex form,
not java) makes both paths above get a match.
Please check (http://fiddle.re/f1c4fd) and let me know, patch can be provided
if needed.
> Camel Dropbox validator regex is too restrictive and fails for common paths
> ---------------------------------------------------------------------------
>
> Key: CAMEL-11912
> URL: https://issues.apache.org/jira/browse/CAMEL-11912
> Project: Camel
> Issue Type: Bug
> Components: camel-dropbox
> Affects Versions: 2.20.0
> Environment: all
> Reporter: Thanos Agelatos
> Labels: easyfix
>
> Most operations on the new Dropbox component (compliant to v2 API of Dropbox)
> has a dropbox path validator. It uses this regex (see below).
> {noformat}
> /*?(\S+)/*?
> {noformat}
> This regex fails in the following paths:
> * "/path with spaces/file" - part of the test suite
> * "/Web Projects/caesars entertainment -
> us/#ops/one/campaigns/archive/20170919/REN_BIG_PULL_WEEKEND_20170907.csv" - a
> real path that in the previous camel version (2.18.2) - v1 API was working.
> It seems that modifying the regex to this one below, (again regex form, not
> java) makes both paths above get a match.
> {noformat}
> /*?(\S+)*.+/*?
> {noformat}
> Please check (http://fiddle.re/f1c4fd) and let me know, patch can be provided
> if needed.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)