Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auth when password has special characters fails. #862

Open
joelandersen89 opened this issue Jul 22, 2024 · 0 comments
Open

Auth when password has special characters fails. #862

joelandersen89 opened this issue Jul 22, 2024 · 0 comments

Comments

@joelandersen89
Copy link

joelandersen89 commented Jul 22, 2024

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))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant