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

URLSessionDelegateProxy self recursion crash #171

Conversation

sergiothinks2
Copy link
Contributor

Puttshack team experiencing a hang/crash noticed in URLSessionDelegateProxy

added checks using !(originalDelegate is URLSessionDelegateProxy) to prevent self-delegation
added similar check for the session delegate: !(sessionDelegate is URLSessionDelegateProxy)
combined the guard conditions to make the code more robust

…prevent self-delegation

added similar check for the session delegate: !(sessionDelegate is URLSessionDelegateProxy)
combined the guard conditions to make the code more robust
Copy link

github-actions bot commented Feb 4, 2025

Dependency Review

The following issues were found:
  • ✅ 0 vulnerable package(s)
  • ✅ 0 package(s) with incompatible licenses
  • ✅ 0 package(s) with invalid SPDX license definitions
  • ⚠️ 2 package(s) with unknown licenses.
See the Details below.

License Issues

Package.resolved

PackageVersionLicenseIssue Type
github.com/undefinedlabs/opentracing-objc0.5.2NullUnknown License
github.com/undefinedlabs/thrift-swift1.1.2NullUnknown License

OpenSSF Scorecard

PackageVersionScoreDetails
swift/github.com/undefinedlabs/opentracing-objc 0.5.2 UnknownUnknown
swift/github.com/undefinedlabs/thrift-swift 1.1.2 UnknownUnknown

Scanned Files

  • Package.resolved

Copy link

github-actions bot commented Feb 4, 2025

Warnings
⚠️ No CHANGELOG entry added.
⚠️ No tests added / modified.

Generated by 🚫 Danger Swift against 8509880

@@ -88,13 +90,10 @@ class URLSessionDelegateProxy: NSObject {
}

// if session delegate also responds to selector, we must call it
if let sessionDelegate = session.delegate,
sessionDelegate.responds(to: selector) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I wouldn't remove this line

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