Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Auth when password has special characters fails.  #862

@joelandersen89

Description

@joelandersen89
ISSUE TYPE
  • Bug Report
Jenkinsapi VERSION

All

Jenkins VERSION

All

SUMMARY

Auth to Jenkins fails when password has special characters.
Example: server = Jenkins(instance_endpoint, username="testuser", password="zzzzzz6@Y74(K.xxxxxxx", timeout=10)

EXPECTED RESULTS

Authentication works regardless of special charters or a way to pass base64 encoded auth to work around.

ACTUAL RESULTS

401 is thrown
"
Failed request at https://jenkins-endpointapi/python with params: {'tree': 'jobs[name,color,url]'} jobs[name,color,url]
Failed to auth
Failed to log into instance with error 401 Client Error: Unauthorized for url: https://jenkins-endpoint/api/python?tree=jobs%5Bname%2Ccolor%2Curl%5D
"

USEFUL INFORMATION

The above example shows how to reproduce.

username="testuser",
password="zzzzzz6@Y74(K.xxxxxxx"
            try:
                print("Connecting")
                server = Jenkins(instance_endpoint, username=user_jaas, password=pass_jaas, timeout=10)
            except Exception as e:
                print("Failed to auth")
                print("Failed to log into instance %s with error %s" % (instance, e))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions