Skip to content

Commit

Permalink
Merge pull request #75 from Video-Nomad/fix/libre-hwm-proper-sensor-i…
Browse files Browse the repository at this point in the history
…d-encoding

fix(LHM): proper SensorID string encoding for request URL.
  • Loading branch information
amnweb authored Nov 29, 2024
2 parents 7e09174 + ee15590 commit 47420f4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/widgets/yasb/libre_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from core.validation.widgets.yasb.libre_monitor import VALIDATION_SCHEMA
from core.widgets.base import BaseWidget
from urllib.parse import quote


class LibreHardwareMonitorWidget(BaseWidget):
Expand Down Expand Up @@ -79,7 +80,7 @@ def __init__(
self._network_manager.authenticationRequired.connect(self._handle_authentication)

# Create a request
url = QUrl(f"http://{self._server_host}:{self._server_port}/Sensor?action=Get&id={self._sensor_id}")
url = QUrl(f"http://{self._server_host}:{self._server_port}/Sensor?action=Get&id={quote(self._sensor_id)}")
self.request = QNetworkRequest(url)
self.request.setHeader(
QNetworkRequest.KnownHeaders.ContentTypeHeader,
Expand Down

0 comments on commit 47420f4

Please sign in to comment.