Skip to content

fix(transport): add missing verify parameter to httpx.HTTPTransport #17612

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

Merged
merged 3 commits into from
Apr 8, 2025

Conversation

IAOTW
Copy link
Contributor

@IAOTW IAOTW commented Apr 8, 2025

fix #16268

Summary

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

​Affected Scope​​:

  • External tool integration via Swagger API imports
  • HTTPS client configuration in SSRF proxy module

​Root Cause Analysis​​:

  1. Global verify=False setting wasn't propagated to HTTPTransport initialization
  2. SSL verification was hardcoded to True in transport layer (observed in error logs: CERTIFICATE_VERIFY_FAILED)16

​Solution Implementation​​:

# Before
httpx.HTTPTransport(proxy=config.PROXY_URL)

# After 
httpx.HTTPTransport(
    proxy=config.PROXY_URL,
    verify=HTTP_REQUEST_NODE_SSL_VERIFY  # Added parameter
)

Screenshots

Before After
image image

Checklist

Important

Please review the checklist below before submitting your pull request.

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. 🐞 bug Something isn't working labels Apr 8, 2025
@IAOTW IAOTW closed this Apr 8, 2025
@IAOTW IAOTW reopened this Apr 8, 2025
crazywoola
crazywoola previously approved these changes Apr 8, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Apr 8, 2025
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Apr 8, 2025
@IAOTW IAOTW requested a review from crazywoola April 8, 2025 08:01
@crazywoola crazywoola merged commit 4124e80 into langgenius:main Apr 8, 2025
6 checks passed
Scorpion1221 added a commit to yybht155/dify that referenced this pull request Apr 15, 2025
* commit '2c2efe2e1e46751206dfa5972790cef6ad31a93f': (169 commits)
  chore(*): bump version to 1.2.0 (langgenius#17675)
  feat(graph_engine): yield control to other threads before node run. (langgenius#17689)
  chore: find code with high complexity (langgenius#17679)
  Chore: remove beta tag of app type (langgenius#17676)
  fix: Account.query => db.session.query(Account) (langgenius#17667)
  feat: add plugin daemon oss env config (langgenius#17663)
  chore: add script for running mypy type checks and speed up mypy checks in CI jobs (langgenius#17489)
  optimize: docker-compose.middleware.yaml update env_file dependence (langgenius#17646)
  chore: add `'no-empty-function': 'error'` to `eslint.config.mjs` (langgenius#17656)
  Fix Performance Issues:  (langgenius#17083)
  Accelerate migration (langgenius#17088)
  chore: bump Nodejs in web image from 20 to 22 LTS (langgenius#13341)
  Fixed the model-modal titles not being clearly distinguished between "Add" and "Setup" (langgenius#17634)
  feat: enhance index type handling and add error notification for missing embedding model (langgenius#16836)
  chore: bump pnpm to v10 in web dockerfile (langgenius#17611)
  chore: add unit test to high frequency hooks (langgenius#17617)
  fix(transport): add missing verify parameter to httpx.HTTPTransport (langgenius#17612)
  fix: Sass @import warning (langgenius#17604)
  fix: Extract docx file fails when the file contains an invalid link (langgenius#17576)
  fix: segment keywords bug (langgenius#17599)
  ...

# Conflicts:
#	api/poetry.lock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
2 participants