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

verify=False is not inherited when creating a session #165

Closed
Anthonybelui opened this issue Oct 24, 2024 · 1 comment
Closed

verify=False is not inherited when creating a session #165

Anthonybelui opened this issue Oct 24, 2024 · 1 comment

Comments

@Anthonybelui
Copy link

Problem Description

When creating a session with verify=False parameter, subsequent requests through this session do not inherit this setting. This contradicts the expected behavior, as all session parameters should be inherited.

Steps to Reproduce

import niquests

# Create session with verify=False
session = niquests.Session()
session.verify = False

# Make request through the session
response = session.get('https://example.com')  # verify=False is not applied
# niquests.exceptions.SSLError: HTTPSConnectionPool(host=.......

Expected Behavior

When setting verify=False for a session, all subsequent requests through this session should be executed with SSL verification disabled.

Current Behavior

Requests through the session ignore the set verify=False value and continue to perform SSL verification.

Additional Context

This can be critical for test environments or systems using self-signed certificates.

System Information

{
  "charset_normalizer": {
    "version": "3.4.0"
  },
  "http1": {
    "h11": "0.14.0"
  },
  "http2": {
    "jh2": "5.0.3"
  },
  "http3": {
    "enabled": true,
    "qh3": "1.2.1"
  },
  "idna": {
    "version": "3.10"
  },
  "implementation": {
    "name": "CPython",
    "version": "3.12.6"
  },
  "niquests": {
    "version": "3.10.1"
  },
  "ocsp": {
    "enabled": true
  },
  "platform": {
    "release": "11",
    "system": "Windows"
  },
  "system_ssl": {
    "version": "300000f0"
  },
  "urllib3.future": {
    "cohabitation_version": null,
    "version": "2.11.903"
  },
  "wassima": {
    "certifi_fallback": false,
    "enabled": true,
    "version": "1.1.4"
  }
}
Ousret added a commit that referenced this issue Oct 25, 2024
3.10.2 (2024-10-25)
------------------

**Fixed**
- Ensure `stream`, and `verify` both defaults to your ``Session``
parameters. (#165)
@Ousret
Copy link
Member

Ousret commented Oct 25, 2024

Fixed in #167
Will be published in next patch version.

@Ousret Ousret closed this as completed Oct 25, 2024
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

No branches or pull requests

2 participants