Skip to content

Commit 3633a6f

Browse files
authored
linux: remove MAC address logging for security
Removed sensitive MAC address logging from initialization and app start.
1 parent f362f89 commit 3633a6f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

linux/hearing-aid-adjustments.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ def __init__(self, mac_address):
3838
self.listeners = {}
3939
self.notification_thread = None
4040
self.running = False
41-
logging.info(f"ATTManager initialized for MAC: {mac_address}")
41+
# Avoid logging full MAC address to prevent sensitive data exposure
42+
mac_tail = ':'.join(mac_address.split(':')[-2:]) if isinstance(mac_address, str) and ':' in mac_address else '[redacted]'
43+
logging.info(f"ATTManager initialized")
4244

4345
def connect(self):
4446
logging.info("Attempting to connect to ATT socket")
@@ -465,7 +467,7 @@ def closeEvent(self, event):
465467
if not re.match(mac_regex, mac):
466468
logging.error("Invalid MAC address format")
467469
sys.exit(1)
468-
logging.info(f"Starting app with MAC: {mac}")
470+
logging.info(f"Starting app")
469471
app = QApplication(sys.argv)
470472

471473
def quit_app(signum, frame):

0 commit comments

Comments
 (0)