AbstractItem.doReload picks wrong name for some branch projects

This issue is archived. You can view it, but you can't modify it. Learn more

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.

            Assignee:
            Jesse Glick
            Reporter:
            Jesse Glick
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: