Show More
@@ -320,7 +320,7 b' class HTTPPasswordHandler(object):' | |||||
320 | base_url, url_user, url_passwd = self.unpack_url(authuri) |
|
320 | base_url, url_user, url_passwd = self.unpack_url(authuri) | |
321 | ui.debug(_('keyring: base url: %s, url user: %s, url pwd: %s\n') % |
|
321 | ui.debug(_('keyring: base url: %s, url user: %s, url pwd: %s\n') % | |
322 | (base_url, url_user or '', url_passwd and '******' or '')) |
|
322 | (base_url, url_user or '', url_passwd and '******' or '')) | |
323 |
|
323 | |||
324 | # Extract username (or password) stored directly in url |
|
324 | # Extract username (or password) stored directly in url | |
325 | if url_user and url_passwd: |
|
325 | if url_user and url_passwd: | |
326 | return url_user, url_passwd, self.SRC_URL, base_url |
|
326 | return url_user, url_passwd, self.SRC_URL, base_url | |
@@ -492,14 +492,15 b' class HTTPPasswordHandler(object):' | |||||
492 | @staticmethod |
|
492 | @staticmethod | |
493 | def unpack_url(authuri): |
|
493 | def unpack_url(authuri): | |
494 | """ |
|
494 | """ | |
495 | Does two things: |
|
495 | Takes original url for which authentication is attempted and: | |
496 |
|
496 | |||
497 |
|
|
497 | - Strips query params from url. Used to convert urls like | |
498 | https://repo.machine.com/repos/apps/module?pairs=0000000000000000000000000000000000000000-0000000000000000000000000000000000000000&cmd=between |
|
498 | https://repo.machine.com/repos/apps/module?pairs=0000000000000000000000000000000000000000-0000000000000000000000000000000000000000&cmd=between | |
499 | to |
|
499 | to | |
500 | https://repo.machine.com/repos/apps/module |
|
500 | https://repo.machine.com/repos/apps/module | |
501 |
|
501 | |||
502 |
|
|
502 | - Extracts username and password, if present, and removes them from url | |
|
503 | (so prefix matching works properly) | |||
503 |
|
504 | |||
504 | Returns url, user, password |
|
505 | Returns url, user, password | |
505 | """ |
|
506 | """ | |
@@ -510,8 +511,12 b' class HTTPPasswordHandler(object):' | |||||
510 | # Strip arguments to get actual remote repository url. |
|
511 | # Strip arguments to get actual remote repository url. | |
511 | # base_url = "%s://%s%s" % (parsed_url.scheme, parsed_url.netloc, |
|
512 | # base_url = "%s://%s%s" % (parsed_url.scheme, parsed_url.netloc, | |
512 | # parsed_url.path) |
|
513 | # parsed_url.path) | |
|
514 | user = parsed_url.user | |||
|
515 | passwd = parsed_url.passwd | |||
|
516 | parsed_url.user = None | |||
|
517 | parsed_url.passwd = None | |||
513 |
|
518 | |||
514 |
return str(parsed_url), |
|
519 | return str(parsed_url), user, passwd | |
515 |
|
520 | |||
516 |
|
521 | |||
517 | ############################################################ |
|
522 | ############################################################ |
General Comments 0
You need to be logged in to leave comments.
Login now