Skip to content
This repository was archived by the owner on Nov 5, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 85 additions & 0 deletions experiments/issue-2-analysis.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Issue #2 Root Cause Analysis

## Problem Statement
Users cannot use normal and virtual cameras simultaneously. When both are enabled, a registration popup appears.

## Root Cause

### 1. Virtual Camera Detection System
**Location:** `test/test_1.2.js:7`

The application includes a comprehensive virtual camera detection system (FCN object) with:
- **60+ blocked virtual camera names** including: Snap Camera, OBS Virtual Camera, ManyCam, DroidCam, etc.
- **Validation functions:**
- `FCN.isValid(cameraLabel)` - Returns `false` if camera matches blocked list
- `FCN.isSuspicious(cameraLabel)` - Returns `true` for suspicious patterns

### 2. Camera Enumeration Blocking
**Location:** `dist/preload.js:54-55`

When cameras are enumerated, Snap Camera is specifically blocked:
```javascript
if (/Snap Camera/.test(d))
return 'asdfasjdcnawecaseaec' // Returns fake/obfuscated name
```

### 3. Virtual Camera Rejection Logic
**Location:** `test/test3.js:28863-28868`

During getUserMedia(), the code validates all camera tracks:
```javascript
null == blogger["allowFakeWebcam"] && u["filter"]((function(e) {
return y(e["label"]),
FCN["isValid"](e["label"])
}))["length"] !== u["length"]
```

**What this does:**
- If `blogger["allowFakeWebcam"]` is `null` or `false` (default is `false`)
- AND the number of valid cameras doesn't match total cameras
- Then it throws an error (code "0x2a0")
- This error triggers the registration popup

### 4. Default Configuration
**Location:** `test/test3.js:27752`

```javascript
i["allowFakeWebcam"] = !1 // Default is false
```

However, at line 27762, there's a blogger configuration that sets it to `true`:
```javascript
r["allowFakeWebcam"] = !0 // true for certain bloggers
```

## The Flow

1. User has both normal camera + virtual camera (e.g., Snap Camera)
2. Application enumerates all media devices
3. Virtual camera is detected and flagged by FCN validation
4. Since `allowFakeWebcam` is `false` by default
5. Validation fails when virtual camera is present
6. Error is thrown
7. Registration popup appears as anti-fraud measure

## Solution

Change the default `allowFakeWebcam` setting from `false` to `true` to allow virtual cameras.

**File to modify:** `test/test3.js:27752`
**Change:** `i["allowFakeWebcam"] = !1` → `i["allowFakeWebcam"] = !0`

This will allow users to use both normal and virtual cameras simultaneously without triggering the registration popup.

## Alternative Solutions Considered

1. **Remove virtual camera from blocked list** - Not ideal, as it's part of a comprehensive security system
2. **Modify validation logic** - Too invasive, affects anti-fraud measures
3. **Change default setting** - ✓ Cleanest solution, minimal impact

## Security Implications

Allowing virtual cameras reduces anti-fraud protection. However:
- Users should have freedom to use legitimate tools like OBS for streaming
- Registration popup can still be triggered by other fraud indicators
- This is a user experience vs security tradeoff
2 changes: 1 addition & 1 deletion test/test3.js
Original file line number Diff line number Diff line change
Expand Up @@ -27749,7 +27749,7 @@ CryptoJS["lib"]["Cipher"] || function(e) {
this["Blogger"] = function() {
var n, a, f = e,
i = {};
i["allowFakeWebcam"] = !1,
i["allowFakeWebcam"] = !0,
i["allowVPN"] = !0,
i["hideWatermark"] = !1,
i["originId"] = 0,
Expand Down