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

Jenkins does not accept special characters in the password

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • groovy-plugin
    • None

      We run our build with Jenkins using Groovy and we also use the 'bat' to run batch DB commands.

      Recently we're working on a project to randomize and rotate passwords.

      To this end we are generating a random ASCII string of N length and it uses chars between ASCII: 33 and 126, excluding: 34,39,47,58,92

      When we trigger a build using one of these strings as the password (obviously having created it in the DB for access,) we receive random errors, one error is "The system cannot find the file specified."

      This error referring to a file is quite strange as there is no file involved when we're trying to run this command, it is built on the fly:

      SET PGUSER=user_dqnvoryi& SET PGPASSWORD=7pIYV8#<0Xx& SET PGCLIENTENCODING=UTF8& psql -h pgwrapper.ebiqa.xhost.com -U user_dqnvoryi -d bipgdb -p 5432 -t -c "SELECT count as cnt FROM pg_database where datname = 'bisecus640458b';"

       

      See password highlighted in red above. If we change that password to a simpler string like: Abc123, then everything works as expected.

       

      Two characters we've found that the system doesn't work with are '@' and '&'.

       

      Two questions:

      Is there a way to escape special characters in this situation?

      If not, then which characters are not allowed so we can exclude them?

       

      Thanks!

          [JENKINS-62255] Jenkins does not accept special characters in the password

          Markus Winter added a comment -

          Also exclude 60 (<) and 62 (>) and maybe also 94 (^) and 124 (|)

          Character escaping on windows can be challenging (https://www.robvanderwoude.com/escapechars.php)

           

          Markus Winter added a comment - Also exclude 60 (<) and 62 (>) and maybe also 94 (^) and 124 (|) Character escaping on windows can be challenging ( https://www.robvanderwoude.com/escapechars.php )  

          lacostej added a comment -

          This seems that the user is using the bat command, not the batch-task-plugin. Removing the component.

          lacostej added a comment - This seems that the user is using the bat command, not the batch-task-plugin. Removing the component.

            kohsuke Kohsuke Kawaguchi
            ericblair Eric Blair
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: