Skip to content
Open
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
4 changes: 3 additions & 1 deletion Click2Minimize/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,9 @@ class AppDelegate: NSObject, NSApplicationDelegate {
let sizeHeight = sizeDescriptor.atIndex(2)?.doubleValue ?? 0

// Extract app ID (name)
let appID = appIDDescriptor.stringValue ?? "Unknown"
let rawAppID = appIDDescriptor.stringValue ?? "Unknown"
// Sanitize appID to prevent Log Injection and other control-character based attacks
let appID = rawAppID.components(separatedBy: .controlCharacters).joined()

let rect = NSRect(x: positionX, y: positionY, width: sizeWidth, height: sizeHeight)
let dockItem = DockItem(rect: rect, appID: appID)
Expand Down