james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tellier Benoit (JIRA)" <server-...@james.apache.org>
Subject [jira] [Updated] (JAMES-1566) PatternSyntaxException in MailboxQuery
Date Mon, 27 Apr 2015 08:37:38 GMT

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

Tellier Benoit updated JAMES-1566:
----------------------------------
    Attachment: 0001-JWC-121-Regular-expression-used-in-MailboxQuery-shou.patch

In this patch, the regular expression used is split on * and % characters, then escaped.

We provided tests for ensuring the behaviour of * and % are still the same.

We added assertj for our tests.

> PatternSyntaxException in MailboxQuery
> --------------------------------------
>
>                 Key: JAMES-1566
>                 URL: https://issues.apache.org/jira/browse/JAMES-1566
>             Project: James Server
>          Issue Type: Bug
>          Components: MailStore & MailRepository
>    Affects Versions: 3.0.0-beta5
>            Reporter: Thomas Söhngen
>            Priority: Minor
>             Fix For: 3.0.0-beta5
>
>         Attachments: 0001-JWC-121-Regular-expression-used-in-MailboxQuery-shou.patch
>
>
> If folder names contain unclosed parentheses (like "Folder.foo(bar") the pattern compiler
will raise the following exception:
> java.util.regex.PatternSyntaxException: Unclosed group near index 13
> Folder.foo(bar
>                         ^
>     at java.util.regex.Pattern.error(Pattern.java:1955)
>     at java.util.regex.Pattern.accept(Pattern.java:1813)
>     at java.util.regex.Pattern.group0(Pattern.java:2908)
>     at java.util.regex.Pattern.sequence(Pattern.java:2051)
>     at java.util.regex.Pattern.expr(Pattern.java:1996)
>     at java.util.regex.Pattern.compile(Pattern.java:1696)
>     at java.util.regex.Pattern.<init>(Pattern.java:1351)
>     at java.util.regex.Pattern.compile(Pattern.java:1028)
>     at org.apache.james.mailbox.model.MailboxQuery.<init>(MailboxQuery.java:72)
>     at org.apache.james.imap.processor.ListProcessor.doProcess(ListProcessor.java:175)
> [...]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message