Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-9016

SolrIdentifierValidator accepts empty names

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 5.5.1, 6.0.1, 6.1
    • Server
    • None

    Description

      SolrIdentifierValidator accepts shard, collection, cores and alias names following this pattern:

      ^(?!\\-)[\\._A-Za-z0-9\\-]*$
      

      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:

      ^(\\.)?[a-zA-Z0-9]+[\\._\\-a-zA-Z0-9]*$
      

      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?

      Attachments

        1. SOLR-9016.patch
          2 kB
          Shai Erera

        Activity

          People

            Unassigned Unassigned
            shaie Shai Erera
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: