Skip to content

Commit 6d72625

Browse files
authored
Fix redaction of VCS URL credentials in locks. (#2964)
1 parent 6637a5e commit 6d72625

File tree

3 files changed

+17
-6
lines changed

3 files changed

+17
-6
lines changed

CHANGES.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Release Notes
22

3+
## 2.64.1
4+
5+
This release is a follow-up to 2.64.0 to fix a regression in locks for credentialed VCS
6+
requirements.
7+
8+
* Fix redaction of VCS URL credentials in locks. (#2964)
9+
310
## 2.64.0
411

512
This release adds support for `--avoid-downloads` / `--no-avoid-downloads` to `pex3 lock create`. By

pex/resolve/locker.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -377,13 +377,13 @@ def analyze(self, line):
377377
)
378378
verified = True
379379
selected_path = os.path.basename(archive_path)
380-
artifact_url = self.parse_url_and_maybe_record_fingerprint(
380+
artifact_url = ArtifactURL.parse(
381381
self._vcs_url_manager.normalize_url(artifact_url.raw_url)
382382
)
383383
self._selected_path_to_pin[selected_path] = build_result.pin
384384

385-
vcs, _, vcs_url = artifact_url.raw_url.partition("+")
386-
if "@" in artifact_url.path:
385+
vcs, _, vcs_url = build_result.url.raw_url.partition("+")
386+
if "@" in build_result.url.path:
387387
vcs_url, _, _ = vcs_url.rpartition("@")
388388
commit_id = self._commit_ids.pop(vcs_url, None)
389389
elif isinstance(artifact_url.scheme, ArchiveScheme.Value):
@@ -452,8 +452,12 @@ def analyze(self, line):
452452
)
453453
source_fingerprint = Fingerprint.from_digest(digest)
454454
verified = True # noqa
455-
vcs, _, vcs_url = artifact_url.raw_url.partition("+")
456-
if "@" in artifact_url.path:
455+
artifact_url = ArtifactURL.parse(
456+
self._vcs_url_manager.normalize_url(artifact_url.raw_url)
457+
)
458+
459+
vcs, _, vcs_url = build_result.url.raw_url.partition("+")
460+
if "@" in build_result.url.path:
457461
vcs_url, _, _ = vcs_url.rpartition("@")
458462
commit_id = self._commit_ids.pop(vcs_url, None)
459463
elif isinstance(artifact_url.scheme, ArchiveScheme.Value):

pex/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Copyright 2015 Pex project contributors.
22
# Licensed under the Apache License, Version 2.0 (see LICENSE).
33

4-
__version__ = "2.64.0"
4+
__version__ = "2.64.1"

0 commit comments

Comments
 (0)