Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-72613

AbstractItem.doReload picks wrong name for some branch projects

XMLWordPrintable

      AbstractItem.load and Items.load presume that File.getName on an item.getRootDir corresponds to the Item.getName. But as of JENKINS-41124 this is not true of some computed folder children, such as branch projects with various metacharacters including _. While AbstractFolder.loadChildren takes this fact into account by looking for name-utf8.txt, direct calls to onLoad from core could bypass that logic, causing the Item.name to improperly be the File.name which may be something mangled, causing bizarre behavior.

      Noticed because of a bug found in CloudBees CI multibranch tests. Normally not an issue since user-level REST/CLI reload would be blocked on read-only branch projects, but SYSTEM can still reload from plugins and trigger the problem.

            jglick Jesse Glick
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: