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

java.lang.UnsupportedOperationException: NOFOLLOW_LINKS not supported when opening file from workspace or artifacts

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • core
    • Jenkins 2.263.4
      OS: AIX

      We recently upgraded to Jenkins 2.263.4 (previous version
      2.235.1) ,now we have issue opening files form workspace.
      Below error is logged in logfile

      2021-02-23 10:48:50.237+0000 [id=76] WARNING h.i.i.InstallUncaughtExceptionHandler#handleException: Caught unhandled exception with ID 9a8eb3ec-a05c-49cd-b4e1-f0c540d8d668
      java.lang.UnsupportedOperationException: NOFOLLOW_LINKS not supported
      at sun.nio.fs.UnixChannelFactory$Flags.toFlags(UnixChannelFactory.java:105)
      at sun.nio.fs.UnixChannelFactory.newFileChannel(UnixChannelFactory.java:131)
      at sun.nio.fs.UnixChannelFactory.newFileChannel(UnixChannelFactory.java:160)
      at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:224)
      at java.nio.file.Files.newByteChannel(Files.java:372)
      at java.nio.file.Files.newByteChannel(Files.java:418)
      at java.nio.file.spi.FileSystemProvider.newInputStream(FileSystemProvider.java:395)
      at java.nio.file.Files.newInputStream(Files.java:163)
      at hudson.FilePath.newInputStreamDenyingSymlinkAsNeeded(FilePath.java:2111)
      at hudson.FilePath.read(FilePath.java:2096)
      at jenkins.util.VirtualFile$FilePathVF.open(VirtualFile.java:1024)

          [JENKINS-64922] java.lang.UnsupportedOperationException: NOFOLLOW_LINKS not supported when opening file from workspace or artifacts

          Anjali created issue -
          Anjali made changes -
          Priority Original: Minor [ 4 ] New: Major [ 3 ]

          Raihaan Shouhell added a comment - Seems to be caused by https://www.jenkins.io/security/advisory/2021-01-13/#SECURITY-1452
          Raihaan Shouhell made changes -
          Labels Original: NOFOLLOW_LINKS

          Anjali added a comment -

          https://www.jenkins.io/security/advisory/2021-01-13/#SECURITY-1452 says Archiving artifacts still behaves as before. But archived artifacts links from GUI are also throwing same error.

          Anjali added a comment - https://www.jenkins.io/security/advisory/2021-01-13/#SECURITY-1452  says Archiving artifacts still behaves as before. But archived artifacts links from GUI are also throwing same error.

          Do you have steps to reproduce this issue?

          Raihaan Shouhell added a comment - Do you have steps to reproduce this issue?
          Anjali made changes -
          Attachment New: image-2021-02-23-15-12-14-332.png [ 54030 ]

          Anjali added a comment -

          Hi Raihaan,

          we just upgraded from 2.235.1 to 2.263.4.

          Open any job workspace

          Try to open any file from workspace or from archived artifact

          It gives "java.lang.UnsupportedOperationException: NOFOLLOW_LINKS not supported" in log file and on jenkins GUI error as below.

          I hope above steps helps.

          regards,

          Anjali

          Anjali added a comment - Hi Raihaan, we just upgraded from 2.235.1 to 2.263.4. Open any job workspace Try to open any file from workspace or from archived artifact It gives "java.lang.UnsupportedOperationException: NOFOLLOW_LINKS not supported" in log file and on jenkins GUI error as below. I hope above steps helps. regards, Anjali

          Seems to be a platform specific issue https://unix.stackexchange.com/questions/504497/aix-nofollow-links-is-not-supported-on-this-platform.

          CC: jthompson seems like the fix for SECURITY-1452 causes issues on the AIX platform.

          Raihaan Shouhell added a comment - Seems to be a platform specific issue https://unix.stackexchange.com/questions/504497/aix-nofollow-links-is-not-supported-on-this-platform . CC: jthompson seems like the fix for SECURITY-1452 causes issues on the AIX platform.

          Jeff Thompson added a comment -

          I knew AIX was a concern in this area. I read documentation and tried to put together a implementation that would work on AIX as well. With no AIX system available, I had to guess if it worked correctly there. I'll put together something to perform a different check. It will still need testing on AIX.

          Jeff Thompson added a comment - I knew AIX was a concern in this area. I read documentation and tried to put together a implementation that would work on AIX as well. With no AIX system available, I had to guess if it worked correctly there. I'll put together something to perform a different check. It will still need testing on AIX.

            jthompson Jeff Thompson
            anjali_waghmare Anjali
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: