bitbucket-pullrequest-builder-plugin
bitbucket-pullrequest-builder-plugin copied to clipboard
Authentication cant handle special characters
When using password that contains special characters fx 'æøå'
Bitbucket just returns '401 Unauthorized' - it works fine with using cURL or Postman so bitbucket does support it.
I tried to implement a fix for 3 hours but no luck. Maybe bumping the httpclient package will help.
@sazo This is really strange - can you provide more details, please? Maybe how to reproduce and verify the error, like you did? That way, another developer (or myself) can use your instructions to reproduce and see who's stripping that unicode down to ascii?
Hi,
I experienced the same issue. I tried the plugin with Basic Auth with an account that the password was containing the character ! and in the log I was always getting the following error
Apr 15, 2019 3:44:00 PM org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme
INFO: basic authentication scheme selected
Apr 15, 2019 3:44:00 PM org.apache.commons.httpclient.HttpMethodDirector processWWWAuthChallenge
INFO: Failure authenticating with BASIC 'Bitbucket.org HTTP'@bitbucket.org:443
Apr 15, 2019 3:44:00 PM bitbucketpullrequestbuilder.bitbucketpullrequestbuilder.bitbucket.ApiClient send
WARNING: Response status: HTTP/1.1 401 Unauthorized URI: https://bitbucket.org/api/2.0/repositories/***********/*********/pullrequests/?pagelen=50
Apr 15, 2019 3:44:00 PM bitbucketpullrequestbuilder.bitbucketpullrequestbuilder.bitbucket.ApiClient send
WARNING:
Apr 15, 2019 3:44:00 PM bitbucketpullrequestbuilder.bitbucketpullrequestbuilder.bitbucket.cloud.CloudApiClient getAllValues
WARNING: invalid response.
To test I created another account which had only numbers and lowercase/uppercase letters in the password and I got rid of the error and the plugin was able to build my PR.
Thanks Dominick