fix: _hub_api SSL context + unauthenticated GET for public resources
- Add _hub_api_ssl_context() to load local CA cert for localhost URLs, matching the SSL trust logic already in transport._httpx_verify - Allow GET/HEAD/OPTIONS requests to proceed without a signing identity; mutating methods (POST/PUT/DELETE/PATCH) still require auth - Add _get_hub_and_optional_identity() for read-only hub commands on public repos (hub issue read, hub issue list) - Use fake_id() from muse.core.types instead of raw 'sha256:' + 'a'*64 - Update _fake_urlopen/_fake signatures to accept **_kw for context kwarg - Update test_missing_token_exits to assert POST (not GET) exits without auth
sha256:5d4a894d54ce01e00d662db1d1b395ca8f95c2a79e3702b3023cd151983a3a2c
sha
+61
~50
symbols
sha256:f87939b9a33907dacb5b494a6757fdd112970443bb8827b1013bab797e76d459
snapshot
+61
symbols added
~50
symbols modified
0
dead code introduced
Semantic Changes
111 symbols
+
test_authenticated_get_sends_msign_header
method
method test_authenticated_get_sends_msign_header L251–266
+
test_localhost_ssl_context_cafile_set
method
method test_localhost_ssl_context_cafile_set L268–294
+
test_get_with_signing_includes_auth_header
method
method test_get_with_signing_includes_auth_header L207–223
+
test_get_without_signing_does_not_exit
method
method test_get_without_signing_does_not_exit L176–184
+
test_R1_hub_issue_read_no_ssl_error_on_localhost
method
method test_R1_hub_issue_read_no_ssl_error_on_localhost L419–441
+
test_R2_public_issue_read_no_exit_without_identity
method
method test_R2_public_issue_read_no_exit_without_identity L443–451
+
test_R4_response_size_cap_still_enforced
method
method test_R4_response_size_cap_still_enforced L462–471
+
test_R5_existing_auth_tests_unaffected
method
method test_R5_existing_auth_tests_unaffected L473–487
+
test_ansi_in_http_error_body_still_sanitized
method
method test_ansi_in_http_error_body_still_sanitized L515–532
+
test_no_auth_header_leaked_on_unauthenticated_get
method
method test_no_auth_header_leaked_on_unauthenticated_get L497–513
+
test_ssl_context_does_not_disable_verification
method
method test_ssl_context_does_not_disable_verification L534–553
+
test_ssrf_scheme_blocking_unaffected_by_public_get_change
method
method test_ssrf_scheme_blocking_unaffected_by_public_get_change L555–563
+
test_localhost_always_gets_custom_context
method
method test_localhost_always_gets_custom_context L375–396
+
test_127_0_0_1_https_gets_custom_ssl_context
method
method test_127_0_0_1_https_gets_custom_ssl_context L135–150
+
test_localhost_https_gets_custom_ssl_context
method
method test_localhost_https_gets_custom_ssl_context L90–112
+
test_concurrent_authenticated_gets_no_deadlock
method
method test_concurrent_authenticated_gets_no_deadlock L604–633
+
test_concurrent_unauthenticated_gets_no_deadlock
method
method test_concurrent_unauthenticated_gets_no_deadlock L573–602
+
test_issue_list_public_no_auth_succeeds
method
method test_issue_list_public_no_auth_succeeds L335–357
+
test_issue_read_public_no_auth_succeeds
method
method test_issue_read_public_no_auth_succeeds L306–333
~
_hub_api
0 comments
To add a comment, use the Muse CLI:
muse hub commit comment sha256:5d4a894d54ce01e00d662db1d1b395ca8f95c2a79e3702b3023cd151983a3a2c --body "your comment"
No comments yet. Be the first to start the discussion.