Uploaded image for project: 'Artifactory Binary Repository'
  1. Artifactory Binary Repository
  2. RTFACT-7231

Config descriptor doesn't validate max repo name length when creating new repository

    Details

    • Type: Bug
    • Status: Open
    • Priority: High
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Configuration
    • Labels:
      None

      Description

      Repository name is limited to 64 characters in the DB nodes table (remote is even shorter to support the '-cache' suffix).

      Attempt to add repository with long name causes the error below. It allows the config to be saved and will prevent Artifactory from starting on the next restart.

      Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'repo' at row 1
      	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4235) ~[mysql-connector-java-5.1.27.jar:na]
      	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4169) ~[mysql-connector-java-5.1.27.jar:na]
      	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2617) ~[mysql-connector-java-5.1.27.jar:na]
      	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2778) ~[mysql-connector-java-5.1.27.jar:na]
      	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2825) ~[mysql-connector-java-5.1.27.jar:na]
      	at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2156) ~[mysql-connector-java-5.1.27.jar:na]
      	at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2459) ~[mysql-connector-java-5.1.27.jar:na]
      	at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2376) ~[mysql-connector-java-5.1.27.jar:na]
      	at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2360) ~[mysql-connector-java-5.1.27.jar:na]
      	at org.artifactory.storage.db.util.JdbcHelper.executeUpdate(JdbcHelper.java:131) ~[classes/:na]
      	at org.artifactory.storage.db.fs.dao.NodesDao.create(NodesDao.java:145) ~[classes/:na]
      	at org.artifactory.storage.db.fs.service.FileServiceImpl.createFolder(FileServiceImpl.java:111) ~[classes/:na]
      	... 95 common frames omitted
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                yossis Yossi Shaul
              • Votes:
                5 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated: