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

Fix trusted-host passthru #2981

Merged
merged 7 commits into from
Oct 10, 2018
Merged

Fix trusted-host passthru #2981

merged 7 commits into from
Oct 10, 2018

Conversation

techalchemy
Copy link
Member

Fix trusted-host passthru

@techalchemy techalchemy added Type: Bug 🐛 This issue is a bug. and removed Type: Bug 🐛 This issue is a bug. labels Oct 10, 2018
Signed-off-by: Dan Ryan <dan@danryan.co>
- Fix marker cleaning
- Fixes #2979

Signed-off-by: Dan Ryan <dan@danryan.co>
Signed-off-by: Dan Ryan <dan@danryan.co>
Signed-off-by: Dan Ryan <dan@danryan.co>
Signed-off-by: Dan Ryan <dan@danryan.co>
Signed-off-by: Dan Ryan <dan@danryan.co>
@techalchemy techalchemy merged commit b3ea804 into master Oct 10, 2018
@techalchemy techalchemy deleted the fix-trusted-hosts branch October 10, 2018 22:45
index_source = index_source.copy()
except SourceNotFound:
src_name = project.src_name_from_url(index)
verify_ssl = True if index not in trusted_hosts else False
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may have considered this already, but while I was testing the issue index was set to something like https://MY_INDEX:8080, whereas trusted_hosts was just a list like['MY_INDEX'].

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no I absolutely in no way was thinking about that, I should probably parse netlocs :D thanks for the comment!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

techalchemy added a commit that referenced this pull request Oct 11, 2018
- Additional fix for #2981

Signed-off-by: Dan Ryan <dan@danryan.co>
techalchemy added a commit that referenced this pull request Oct 11, 2018
- Additional fix for #2981

Signed-off-by: Dan Ryan <dan@danryan.co>
sources.append({"url": extra_src})
src_name = project.src_name_from_url(idx)
verify_ssl = True if idx not in trusted_hosts else False
extra_src = {"url": idx, "verify_ssl": verify_ssl, "name": extra_src}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hate to do this to you, but extra_src is undefined here if the exception is triggered

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

Successfully merging this pull request may close these issues.

2 participants