Opened 9 months ago

Closed 9 months ago

Last modified 9 months ago

#4440 closed defect (fixed)

[HA crash] iOS9 breaking NSHTTPURLResponse Swift nilness contract

Reported by: pavelz Assignee:
Priority: P2 Milestone: Adblock-Browser-for-iOS-1.5.1
Module: Adblock-Browser-for-iOS Keywords:
Cc: Blocked By:
Blocking: Platform: Adblock Browser for iOS
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description

Environment

iOS9
ABB 1.5.0 Appstore release

How to reproduce

Unknown

Observed behaviour

Crash
https://rink.hockeyapp.net/manage/apps/310687/app_versions/26/crash_reasons/136029900

Expected behaviour

No crash

Change History (6)

comment:1 Changed 9 months ago by pavelz

The stacktrace claims to crash on null pointer here
https://github.com/kitt-browser/kitt-core/blob/master/src/WebRequest/WebRequestEventDispatcher.swift#L59
but because it's being called from here
https://github.com/kitt-browser/kitt-core/blob/master/src/WebRequest/ProtocolHandler.swift#L512
and details is being explicitly unwrapped in condition, it's more likely the next line
https://github.com/kitt-browser/kitt-core/blob/master/src/WebRequest/WebRequestEventDispatcher.swift#L60
where it's very possible that the calling code sends nil for httpResponse.allHeaderFields
which is contracted to be non-optional by NSHTTPURLResponse API

comment:2 Changed 9 months ago by pavelz

Last edited 9 months ago by pavelz (previous) (diff)

comment:4 Changed 9 months ago by pavelz

  • Resolution set to fixed
  • Status changed from new to closed

comment:5 Changed 9 months ago by mario

  • Milestone set to Adblock-Browser-for-iOS-1.5.1

Added to Milestone 1.5.1

comment:6 Changed 9 months ago by mario

  • Priority changed from Unknown to P2

Adjusted priority

Note: See TracTickets for help on using tickets.