[jira] [Updated] (SOLR-9016) SolrIdentifierValidator accepts empty names

2016-04-26 Thread Anshum Gupta (JIRA)

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

Anshum Gupta updated SOLR-9016:
---
Fix Version/s: 6.0.1
   6.1
   5.5.1

> SolrIdentifierValidator accepts empty names
> ---
>
> Key: SOLR-9016
> URL: https://issues.apache.org/jira/browse/SOLR-9016
> Project: Solr
>  Issue Type: Bug
>  Components: Server
>Reporter: Shai Erera
> Fix For: 5.5.1, 6.1, 6.0.1
>
> Attachments: SOLR-9016.patch
>
>
> SolrIdentifierValidator accepts shard, collection, cores and alias names 
> following this pattern:
> {code}
> ^(?!\\-)[\\._A-Za-z0-9\\-]*$
> {code}
> This accepts an "empty" name. This is easily fixable by changing the {{\*}} 
> to {{+}}. However, it also accepts names such as {{..}}, {{,__---}} etc. Do 
> we not want to require collection names to have a letter/digit identifier in 
> them? Something like the following pattern:
> {code}
> ^(\\.)?[a-zA-Z0-9]+[\\._\\-a-zA-Z0-9]*$
> {code}
> That pattern requires the name to start with an optional {{.}} followed by a 
> series of letters/digits followed by the rest of the allowed characters.
> What do you think?



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

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org



[jira] [Updated] (SOLR-9016) SolrIdentifierValidator accepts empty names

2016-04-26 Thread Shai Erera (JIRA)

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

Shai Erera updated SOLR-9016:
-
Attachment: SOLR-9016.patch

Patch fixes the regex to not accept empty identifiers, however it does not 
modify the rule, i.e. someone could still use an identifier like {{\_\_.--}} if 
they want to. I'll be happy to change that, but since I didn't receive any 
feedback I think this fix is the least we can do (and also push into 5.5.1).

The patch also modifies the exception message slightly.

> SolrIdentifierValidator accepts empty names
> ---
>
> Key: SOLR-9016
> URL: https://issues.apache.org/jira/browse/SOLR-9016
> Project: Solr
>  Issue Type: Bug
>  Components: Server
>Reporter: Shai Erera
> Attachments: SOLR-9016.patch
>
>
> SolrIdentifierValidator accepts shard, collection, cores and alias names 
> following this pattern:
> {code}
> ^(?!\\-)[\\._A-Za-z0-9\\-]*$
> {code}
> This accepts an "empty" name. This is easily fixable by changing the {{\*}} 
> to {{+}}. However, it also accepts names such as {{..}}, {{,__---}} etc. Do 
> we not want to require collection names to have a letter/digit identifier in 
> them? Something like the following pattern:
> {code}
> ^(\\.)?[a-zA-Z0-9]+[\\._\\-a-zA-Z0-9]*$
> {code}
> That pattern requires the name to start with an optional {{.}} followed by a 
> series of letters/digits followed by the rest of the allowed characters.
> What do you think?



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

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org