Skip to content

Commit 2748020

Browse files
committed
update changelog & docs; cleanup
1 parent d19908f commit 2748020

File tree

7 files changed

+283
-14
lines changed

7 files changed

+283
-14
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## Unreleased
4+
5+
### Fixes
6+
7+
- fix(session-replay): Add detection for potential PII leaks disabling session replay (#6389)
8+
39
## 8.56.2
410

511
### Fixes

Samples/SentrySampleShared/SentrySampleShared/SentrySDKOverrides.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ public enum SentrySDKOverrides: String, CaseIterable {
110110

111111
case disableMaskAllImages = "--io.sentry.session-replay.disable-mask-all-images"
112112
case disableMaskAllText = "--io.sentry.session-replay.disable-mask-all-text"
113+
114+
case disableInDangerousEnvironment = "--io.sentry.session-replay.disable-in-dangerous-environment"
113115
}
114116
case sessionReplay = "Session Replay"
115117

@@ -324,7 +326,7 @@ extension SentrySDKOverrides.Performance {
324326
extension SentrySDKOverrides.SessionReplay {
325327
public var overrideType: OverrideType {
326328
switch self {
327-
case .disable, .disableViewRendererV2, .enableFastViewRendering, .disableMaskAllText, .disableMaskAllImages: return .boolean
329+
case .disable, .disableViewRendererV2, .enableFastViewRendering, .disableMaskAllText, .disableMaskAllImages, .disableInDangerousEnvironment: return .boolean
328330
case .onErrorSampleRate, .sessionSampleRate: return .float
329331
case .quality: return .string
330332
}
@@ -412,7 +414,7 @@ extension SentrySDKOverrides.SessionReplay {
412414
public var ignoresDisableEverything: Bool {
413415
switch self {
414416
case .disable: return false
415-
case .disableViewRendererV2, .enableFastViewRendering, .disableMaskAllText, .disableMaskAllImages, .onErrorSampleRate, .sessionSampleRate, .quality: return true
417+
case .disableViewRendererV2, .enableFastViewRendering, .disableMaskAllText, .disableMaskAllImages, .onErrorSampleRate, .sessionSampleRate, .quality, .disableInDangerousEnvironment: return true
416418
}
417419
}
418420
}

Samples/SentrySampleShared/SentrySampleShared/SentrySDKWrapper.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,9 @@ public struct SentrySDKWrapper {
6262
let defaultReplayQuality = options.sessionReplay.quality
6363
options.sessionReplay.quality = SentryReplayOptions.SentryReplayQuality(rawValue: (SentrySDKOverrides.SessionReplay.quality.stringValue as? NSString)?.integerValue ?? defaultReplayQuality.rawValue) ?? defaultReplayQuality
6464

65-
options.sessionReplay.disableInDangerousEnvironment = false
65+
// Allow configuring dangerous environment protection via SDK override.
66+
// Default to false for the sample app to allow testing on iOS 26+ with Liquid Glass.
67+
options.sessionReplay.disableInDangerousEnvironment = !SentrySDKOverrides.SessionReplay.disableInDangerousEnvironment.boolValue
6668
}
6769

6870
#if !os(tvOS)

Samples/Shared/feature-flags.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ schemeTemplates:
2222
"--io.sentry.session-replay.enable-fast-view-rendering": false
2323
"--io.sentry.session-replay.disable-mask-all-images": false
2424
"--io.sentry.session-replay.disable-mask-all-text": false
25+
"--io.sentry.session-replay.disable-in-dangerous-environment": false
2526

2627
# user feedback
2728
"--io.sentry.feedback.use-custom-feedback-button": false

Sources/Swift/Integrations/SessionReplay/SentryReplayOptions.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,12 +218,12 @@ public class SentryReplayOptions: NSObject, SentryRedactOptions {
218218

219219
/**
220220
* Due to internal changes with the release of Liquid Glass on iOS 26.0, the masking of text and images can not be reliably guaranteed.
221-
*
222-
* Therefore the session replay integration is disabled by default starting with `8.57.0` as a defensive mechanism.
221+
222+
* Therefore the session replay integration is disabled by default unless the environment is detected as safe.
223223
*
224224
* - Important: This flag allows to re-enable the session replay integration on iOS 26.0 and later, but please be aware that text and images may not be masked as expected.
225225
*
226-
* - Note: See [GitHub issues #1234](https://github.com/getsentry/sentry-cocoa/issue/1234) for more information.
226+
* - Note: See [GitHub issues #6389](https://github.com/getsentry/sentry-cocoa/issues/6389) for more information.
227227
*/
228228
public var disableInDangerousEnvironment: Bool
229229

sdk_api.json

Lines changed: 133 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48946,6 +48946,55 @@
4894648946
}
4894748947
]
4894848948
},
48949+
{
48950+
"kind": "Var",
48951+
"name": "disableInDangerousEnvironment",
48952+
"printedName": "disableInDangerousEnvironment",
48953+
"children": [
48954+
{
48955+
"kind": "TypeNominal",
48956+
"name": "Bool",
48957+
"printedName": "Swift.Bool",
48958+
"usr": "s:Sb"
48959+
}
48960+
],
48961+
"declKind": "Var",
48962+
"usr": "s:6Sentry0A13ReplayOptionsC13DefaultValuesC29disableInDangerousEnvironmentSbvpZ",
48963+
"mangledName": "$s6Sentry0A13ReplayOptionsC13DefaultValuesC29disableInDangerousEnvironmentSbvpZ",
48964+
"moduleName": "Sentry",
48965+
"static": true,
48966+
"declAttributes": [
48967+
"Final",
48968+
"HasStorage"
48969+
],
48970+
"isLet": true,
48971+
"hasStorage": true,
48972+
"accessors": [
48973+
{
48974+
"kind": "Accessor",
48975+
"name": "Get",
48976+
"printedName": "Get()",
48977+
"children": [
48978+
{
48979+
"kind": "TypeNominal",
48980+
"name": "Bool",
48981+
"printedName": "Swift.Bool",
48982+
"usr": "s:Sb"
48983+
}
48984+
],
48985+
"declKind": "Accessor",
48986+
"usr": "s:6Sentry0A13ReplayOptionsC13DefaultValuesC29disableInDangerousEnvironmentSbvgZ",
48987+
"mangledName": "$s6Sentry0A13ReplayOptionsC13DefaultValuesC29disableInDangerousEnvironmentSbvgZ",
48988+
"moduleName": "Sentry",
48989+
"static": true,
48990+
"implicit": true,
48991+
"declAttributes": [
48992+
"Final"
48993+
],
48994+
"accessorKind": "get"
48995+
}
48996+
]
48997+
},
4894948998
{
4895048999
"kind": "Var",
4895149000
"name": "maskedViewClasses",
@@ -50478,6 +50527,79 @@
5047850527
}
5047950528
]
5048050529
},
50530+
{
50531+
"kind": "Var",
50532+
"name": "disableInDangerousEnvironment",
50533+
"printedName": "disableInDangerousEnvironment",
50534+
"children": [
50535+
{
50536+
"kind": "TypeNominal",
50537+
"name": "Bool",
50538+
"printedName": "Swift.Bool",
50539+
"usr": "s:Sb"
50540+
}
50541+
],
50542+
"declKind": "Var",
50543+
"usr": "c:@M@Sentry@objc(cs)SentryReplayOptions(py)disableInDangerousEnvironment",
50544+
"mangledName": "$s6Sentry0A13ReplayOptionsC29disableInDangerousEnvironmentSbvp",
50545+
"moduleName": "Sentry",
50546+
"declAttributes": [
50547+
"ObjC",
50548+
"HasStorage"
50549+
],
50550+
"hasStorage": true,
50551+
"accessors": [
50552+
{
50553+
"kind": "Accessor",
50554+
"name": "Get",
50555+
"printedName": "Get()",
50556+
"children": [
50557+
{
50558+
"kind": "TypeNominal",
50559+
"name": "Bool",
50560+
"printedName": "Swift.Bool",
50561+
"usr": "s:Sb"
50562+
}
50563+
],
50564+
"declKind": "Accessor",
50565+
"usr": "c:@M@Sentry@objc(cs)SentryReplayOptions(im)disableInDangerousEnvironment",
50566+
"mangledName": "$s6Sentry0A13ReplayOptionsC29disableInDangerousEnvironmentSbvg",
50567+
"moduleName": "Sentry",
50568+
"implicit": true,
50569+
"declAttributes": [
50570+
"ObjC"
50571+
],
50572+
"accessorKind": "get"
50573+
},
50574+
{
50575+
"kind": "Accessor",
50576+
"name": "Set",
50577+
"printedName": "Set()",
50578+
"children": [
50579+
{
50580+
"kind": "TypeNominal",
50581+
"name": "Void",
50582+
"printedName": "()"
50583+
},
50584+
{
50585+
"kind": "TypeNominal",
50586+
"name": "Bool",
50587+
"printedName": "Swift.Bool",
50588+
"usr": "s:Sb"
50589+
}
50590+
],
50591+
"declKind": "Accessor",
50592+
"usr": "c:@M@Sentry@objc(cs)SentryReplayOptions(im)setDisableInDangerousEnvironment:",
50593+
"mangledName": "$s6Sentry0A13ReplayOptionsC29disableInDangerousEnvironmentSbvs",
50594+
"moduleName": "Sentry",
50595+
"implicit": true,
50596+
"declAttributes": [
50597+
"ObjC"
50598+
],
50599+
"accessorKind": "set"
50600+
}
50601+
]
50602+
},
5048150603
{
5048250604
"kind": "Constructor",
5048350605
"name": "init",
@@ -50506,7 +50628,7 @@
5050650628
{
5050750629
"kind": "Constructor",
5050850630
"name": "init",
50509-
"printedName": "init(sessionSampleRate:onErrorSampleRate:maskAllText:maskAllImages:enableViewRendererV2:enableFastViewRendering:)",
50631+
"printedName": "init(sessionSampleRate:onErrorSampleRate:maskAllText:maskAllImages:enableViewRendererV2:enableFastViewRendering:disableInDangerousEnvironment:)",
5051050632
"children": [
5051150633
{
5051250634
"kind": "TypeNominal",
@@ -50549,6 +50671,13 @@
5054950671
"hasDefaultArg": true,
5055050672
"usr": "s:Sb"
5055150673
},
50674+
{
50675+
"kind": "TypeNominal",
50676+
"name": "Bool",
50677+
"printedName": "Swift.Bool",
50678+
"hasDefaultArg": true,
50679+
"usr": "s:Sb"
50680+
},
5055250681
{
5055350682
"kind": "TypeNominal",
5055450683
"name": "Bool",
@@ -50558,10 +50687,10 @@
5055850687
}
5055950688
],
5056050689
"declKind": "Constructor",
50561-
"usr": "c:@M@Sentry@objc(cs)SentryReplayOptions(im)initWithSessionSampleRate:onErrorSampleRate:maskAllText:maskAllImages:enableViewRendererV2:enableFastViewRendering:",
50562-
"mangledName": "$s6Sentry0A13ReplayOptionsC17sessionSampleRate07onErroreF011maskAllText0iJ6Images20enableViewRendererV20m4FastN9RenderingACSf_SfS4btcfc",
50690+
"usr": "c:@M@Sentry@objc(cs)SentryReplayOptions(im)initWithSessionSampleRate:onErrorSampleRate:maskAllText:maskAllImages:enableViewRendererV2:enableFastViewRendering:disableInDangerousEnvironment:",
50691+
"mangledName": "$s6Sentry0A13ReplayOptionsC17sessionSampleRate07onErroreF011maskAllText0iJ6Images20enableViewRendererV20m4FastN9Rendering29disableInDangerousEnvironmentACSf_SfS5btcfc",
5056350692
"moduleName": "Sentry",
50564-
"objc_name": "initWithSessionSampleRate:onErrorSampleRate:maskAllText:maskAllImages:enableViewRendererV2:enableFastViewRendering:",
50693+
"objc_name": "initWithSessionSampleRate:onErrorSampleRate:maskAllText:maskAllImages:enableViewRendererV2:enableFastViewRendering:disableInDangerousEnvironment:",
5056550694
"declAttributes": [
5056650695
"ObjC"
5056750696
],

0 commit comments

Comments
 (0)