daily-psk: use :convert for url-encoding

This commit is contained in:
Christian Hesse 2026-05-20 08:59:25 +02:00
parent 0b2f6eeb01
commit 58afe6d632
4 changed files with 4 additions and 8 deletions

View file

@ -27,7 +27,6 @@
:global ScriptLock; :global ScriptLock;
:global SendNotification2; :global SendNotification2;
:global SymbolForNotification; :global SymbolForNotification;
:global UrlEncode;
:global WaitForFile; :global WaitForFile;
:global WaitFullyConnected; :global WaitFullyConnected;
@ -78,7 +77,7 @@
$LogPrint debug $ScriptName ("Already sent a mail for SSID " . $Ssid . ", skipping."); $LogPrint debug $ScriptName ("Already sent a mail for SSID " . $Ssid . ", skipping.");
} else={ } else={
:local Link ($DailyPskQrCodeUrl . \ :local Link ($DailyPskQrCodeUrl . \
"?scale=8&level=1&ssid=" . [ $UrlEncode $Ssid ] . "&pass=" . [ $UrlEncode $NewPsk ]); "?scale=8&level=1&ssid=" . [ :convert to=url $Ssid ] . "&pass=" . [ :convert to=url $NewPsk ]);
$SendNotification2 ({ origin=$ScriptName; \ $SendNotification2 ({ origin=$ScriptName; \
subject=([ $SymbolForNotification "calendar" ] . "daily PSK " . $Ssid); \ subject=([ $SymbolForNotification "calendar" ] . "daily PSK " . $Ssid); \
message=("This is the daily PSK on " . $Identity . ":\n\n" . \ message=("This is the daily PSK on " . $Identity . ":\n\n" . \

View file

@ -27,7 +27,6 @@
:global ScriptLock; :global ScriptLock;
:global SendNotification2; :global SendNotification2;
:global SymbolForNotification; :global SymbolForNotification;
:global UrlEncode;
:global WaitForFile; :global WaitForFile;
:global WaitFullyConnected; :global WaitFullyConnected;
@ -77,7 +76,7 @@
$LogPrint debug $ScriptName ("Already sent a mail for SSID " . $Ssid . ", skipping."); $LogPrint debug $ScriptName ("Already sent a mail for SSID " . $Ssid . ", skipping.");
} else={ } else={
:local Link ($DailyPskQrCodeUrl . \ :local Link ($DailyPskQrCodeUrl . \
"?scale=8&level=1&ssid=" . [ $UrlEncode $Ssid ] . "&pass=" . [ $UrlEncode $NewPsk ]); "?scale=8&level=1&ssid=" . [ :convert to=url $Ssid ] . "&pass=" . [ :convert to=url $NewPsk ]);
$SendNotification2 ({ origin=$ScriptName; \ $SendNotification2 ({ origin=$ScriptName; \
subject=([ $SymbolForNotification "calendar" ] . "daily PSK " . $Ssid); \ subject=([ $SymbolForNotification "calendar" ] . "daily PSK " . $Ssid); \
message=("This is the daily PSK on " . $Identity . ":\n\n" . \ message=("This is the daily PSK on " . $Identity . ":\n\n" . \

View file

@ -28,7 +28,6 @@
:global ScriptLock; :global ScriptLock;
:global SendNotification2; :global SendNotification2;
:global SymbolForNotification; :global SymbolForNotification;
:global UrlEncode;
:global WaitForFile; :global WaitForFile;
:global WaitFullyConnected; :global WaitFullyConnected;
@ -93,7 +92,7 @@
$LogPrint debug $ScriptName ("Already sent a mail for SSID " . $Ssid . ", skipping."); $LogPrint debug $ScriptName ("Already sent a mail for SSID " . $Ssid . ", skipping.");
} else={ } else={
:local Link ($DailyPskQrCodeUrl . \ :local Link ($DailyPskQrCodeUrl . \
"?scale=8&level=1&ssid=" . [ $UrlEncode $Ssid ] . "&pass=" . [ $UrlEncode $NewPsk ]); "?scale=8&level=1&ssid=" . [ :convert to=url $Ssid ] . "&pass=" . [ :convert to=url $NewPsk ]);
$SendNotification2 ({ origin=$ScriptName; \ $SendNotification2 ({ origin=$ScriptName; \
subject=([ $SymbolForNotification "calendar" ] . "daily PSK " . $Ssid); \ subject=([ $SymbolForNotification "calendar" ] . "daily PSK " . $Ssid); \
message=("This is the daily PSK on " . $Identity . ":\n\n" . \ message=("This is the daily PSK on " . $Identity . ":\n\n" . \

View file

@ -27,7 +27,6 @@
:global ScriptLock; :global ScriptLock;
:global SendNotification2; :global SendNotification2;
:global SymbolForNotification; :global SymbolForNotification;
:global UrlEncode;
:global WaitForFile; :global WaitForFile;
:global WaitFullyConnected; :global WaitFullyConnected;
@ -78,7 +77,7 @@
$LogPrint debug $ScriptName ("Already sent a mail for SSID " . $Ssid . ", skipping."); $LogPrint debug $ScriptName ("Already sent a mail for SSID " . $Ssid . ", skipping.");
} else={ } else={
:local Link ($DailyPskQrCodeUrl . \ :local Link ($DailyPskQrCodeUrl . \
"?scale=8&level=1&ssid=" . [ $UrlEncode $Ssid ] . "&pass=" . [ $UrlEncode $NewPsk ]); "?scale=8&level=1&ssid=" . [ :convert to=url $Ssid ] . "&pass=" . [ :convert to=url $NewPsk ]);
$SendNotification2 ({ origin=$ScriptName; \ $SendNotification2 ({ origin=$ScriptName; \
subject=([ $SymbolForNotification "calendar" ] . "daily PSK " . $Ssid); \ subject=([ $SymbolForNotification "calendar" ] . "daily PSK " . $Ssid); \
message=("This is the daily PSK on " . $Identity . ":\n\n" . \ message=("This is the daily PSK on " . $Identity . ":\n\n" . \