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

SSH public key field in the user config page lacks form validation

      It is a common mistake to type the SSH key in multiple lines. Look for these typical errors and make sure the keys follow the valid syntax.

          [JENKINS-16337] SSH public key field in the user config page lacks form validation

          Jesse Glick added a comment -

          This is in the core (specifically the ssh-cli-auth module), not the ssh plugin.

          AFAICT it does no parsing whatsoever of what you enter. It just splits it by newline, and then when authenticating, generates an expected public key string and does a String.equals against each line in turn.

          Jesse Glick added a comment - This is in the core (specifically the ssh-cli-auth module), not the ssh plugin. AFAICT it does no parsing whatsoever of what you enter. It just splits it by newline, and then when authenticating, generates an expected public key string and does a String.equals against each line in turn.

          Code changed in jenkins
          User: Jesse Glick
          Path:
          src/main/java/org/jenkinsci/main/modules/cli/auth/ssh/UserPropertyImpl.java
          src/test/java/org/jenkinsci/main/modules/cli/auth/ssh/TheTest.java
          http://jenkins-ci.org/commit/ssh-cli-auth-module/da9030294137c89b5f213a87c4ce081e9c80fac5
          Log:
          [FIXED JENKINS-16337] Provide basic syntactic validation of public keys.
          Does not try to actually decode them.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/org/jenkinsci/main/modules/cli/auth/ssh/UserPropertyImpl.java src/test/java/org/jenkinsci/main/modules/cli/auth/ssh/TheTest.java http://jenkins-ci.org/commit/ssh-cli-auth-module/da9030294137c89b5f213a87c4ce081e9c80fac5 Log: [FIXED JENKINS-16337] Provide basic syntactic validation of public keys. Does not try to actually decode them.

          Code changed in jenkins
          User: Jesse Glick
          Path:
          war/pom.xml
          http://jenkins-ci.org/commit/jenkins/24df43fa448efae530da9ed8d816a1ba3541bbcb
          Log:
          Merge pull request #2840 from jglick/ssh-cli-auth-JENKINS-16337

          JENKINS-16337 ssh-cli-auth 1.4

          Compare: https://github.com/jenkinsci/jenkins/compare/1c67022c4bf4...24df43fa448e

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: war/pom.xml http://jenkins-ci.org/commit/jenkins/24df43fa448efae530da9ed8d816a1ba3541bbcb Log: Merge pull request #2840 from jglick/ssh-cli-auth- JENKINS-16337 JENKINS-16337 ssh-cli-auth 1.4 Compare: https://github.com/jenkinsci/jenkins/compare/1c67022c4bf4...24df43fa448e

          Oleg Nenashev added a comment -

          Integrated towards 2.55

          Oleg Nenashev added a comment - Integrated towards 2.55

            jglick Jesse Glick
            kohsuke Kohsuke Kawaguchi
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: