FileSystemJarCache not defensive enough

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

XMLWordPrintable

      People occasionally report class loading problems which go away when the Remoting cache is cleared. (Incoherent InvalidClassException; empty ZIP.) Root cause is TBD, but in the meantime FileSystemJarCache.retrieve is not sufficiently robust.

      • After calling JarLoaderImpl.writeJarTo, it does not verify that tmp actually has the expected checksum. What if the other side sent corrupt content, or a zero-length stream?
      • File.renameTo is not guaranteed to be atomic. If on Java 7, should use Files.move(tmp.toPath(), target.toPath(), StandardCopyOption.ATOMIC_MOVE) to be sure there is no race condition.

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

              Created:
              Updated:
              Resolved:
              Archived: