Skip to content
Merged
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
5 changes: 3 additions & 2 deletions action_devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import json
import logging
import requests
import secrets
from flask import current_app
from notifications import mqtt

Expand Down Expand Up @@ -316,8 +317,8 @@ def report_state():
if not REPORTSTATE_AVAILABLE:
logger.warning("ReportState module not available, skipping report_state")
return "ReportState not available"
import random
n = random.randint(10**19, 10**20)

n = 10**19 + secrets.randbelow(9 * 10**19 + 1)
report_state_file = {
'requestId': str(n),
'agentUserId': current_app.config['AGENT_USER_ID'],
Expand Down
Loading