Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-2684

Authorization header can wrap for long passwords

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.4.0
    • Component/s: Search
    • Labels:
      None

      Description

      As reported in MNGECLIPSE-1516

      I'm running m2eclipse 0.9.9-200907201117 pointing to an authenticated Nexus repository. It appears that m2eclipse is wrapping the base 64 basic authorization header for long passwords:

      java.lang.RuntimeException: java.lang.IllegalArgumentException: Illegal character(s) in message header value: Basic XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
      XXXXXXXXXXXXXXXXXXX=
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:921)
      at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:2022)
      at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:376)
      at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:318)
      at org.apache.maven.wagon.providers.http.LightweightHttpWagon.fillInputData(LightweightHttpWagon.java:115)
      at org.apache.maven.wagon.StreamWagon.getInputStream(StreamWagon.java:116)
      at org.apache.maven.wagon.StreamWagon.getIfNewer(StreamWagon.java:88)
      at org.apache.maven.wagon.StreamWagon.get(StreamWagon.java:61)
      at org.apache.maven.repository.legacy.DefaultWagonManager.getRemoteFile(DefaultWagonManager.java:320)
      at org.apache.maven.repository.legacy.DefaultWagonManager.getArtifact(DefaultWagonManager.java:123)
      at org.apache.maven.repository.legacy.DefaultWagonManager.getArtifact(DefaultWagonManager.java:170)
      at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:168)
      at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:86)
      at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:511)
      at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:398)
      at org.apache.maven.repository.LegacyRepositorySystem.resolve(LegacyRepositorySystem.java:307)
      at org.apache.maven.project.DefaultProjectBuilder.build(DefaultProjectBuilder.java:234)
      at org.apache.maven.project.artifact.MavenMetadataSource.retrieve(MavenMetadataSource.java:126)
      at org.apache.maven.repository.legacy.resolver.DefaultLegacyArtifactCollector.recurse(DefaultLegacyArtifactCollector.java:488)
      at org.apache.maven.repository.legacy.resolver.DefaultLegacyArtifactCollector.recurse(DefaultLegacyArtifactCollector.java:518)
      at org.apache.maven.repository.legacy.resolver.DefaultLegacyArtifactCollector.collect(DefaultLegacyArtifactCollector.java:111)
      at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:458)
      at org.apache.maven.repository.LegacyRepositorySystem.resolve(LegacyRepositorySystem.java:307)
      at org.apache.maven.project.DefaultProjectBuilder.buildProjectWithDependencies(DefaultProjectBuilder.java:321)
      at org.maven.ide.eclipse.internal.embedder.MavenImpl.readProjectWithDependencies(MavenImpl.java:319)
      at org.maven.ide.eclipse.internal.project.MavenProjectManagerImpl.readProjectWithDependencies(MavenProjectManagerImpl.java:691)
      at org.maven.ide.eclipse.internal.project.MavenProjectManagerImpl.readProjectWithDependencies(MavenProjectManagerImpl.java:683)
      at org.maven.ide.eclipse.internal.project.MavenProjectFacade.getMavenProject(MavenProjectFacade.java:171)
      at org.maven.ide.eclipse.internal.project.WorkspaceStateWriter.mavenProjectChanged(WorkspaceStateWriter.java:52)
      at org.maven.ide.eclipse.internal.project.MavenProjectManagerImpl.notifyProjectChangeListeners(MavenProjectManagerImpl.java:664)
      at org.maven.ide.eclipse.internal.project.MavenProjectManagerImpl.applyMutableProjectRegistry(MavenProjectManagerImpl.java:775)
      at org.maven.ide.eclipse.internal.project.MavenProjectManagerRefreshJob.run(MavenProjectManagerRefreshJob.java:98)
      at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
      Caused by: java.lang.IllegalArgumentException: Illegal character(s) in message header value: Basic XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
      XXXXXXXXXXXXXXXXXXX=
      at sun.net.www.protocol.http.HttpURLConnection.checkMessageHeader(HttpURLConnection.java:323)
      at sun.net.www.protocol.http.HttpURLConnection.setAuthenticationProperty(HttpURLConnection.java:2080)
      at sun.net.www.protocol.http.BasicAuthentication.setHeaders(BasicAuthentication.java:143)
      at sun.net.www.protocol.http.HttpURLConnection.getServerAuthentication(HttpURLConnection.java:1680)
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1052)
      at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:367)
      ... 30 more
      

      Note the newline after 76 characters.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jdcasey John Casey
                Reporter:
                ifedorenko Igor Fedorenko
                Last Updated By:
                Rich Seddon
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Date of First Response:

                  Time Tracking

                  Estimated:
                  Original Estimate - 3h Original Estimate - 3h
                  3h
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 30h
                  30h