();
@@ -128,18 +129,18 @@ export function RenderDeviceRows() {
""
}
- | ${device.DeviceName} |
- ${device.Alias || ""} |
- ${device.CurrentUser} |
+ ${EncodeForHTML(device.DeviceName)} |
+ ${EncodeForHTML(device.Alias) || ""} |
+ ${EncodeForHTML(device.CurrentUser)} |
${new Date(device.LastOnline).toLocaleString()} |
- ${device.PublicIP} |
- ${device.Platform} |
- ${device.OSDescription} |
+ ${EncodeForHTML(device.PublicIP)} |
+ ${EncodeForHTML(device.Platform)} |
+ ${EncodeForHTML(device.OSDescription)} |
${Math.round(device.CpuUtilization * 100)}% |
${Math.round(device.UsedStorage / device.TotalStorage * 100)}% |
- ${device.TotalStorage.toLocaleString()} |
+ ${EncodeForHTML(device.TotalStorage.toLocaleString())} |
${Math.round(device.UsedMemory / device.TotalMemory * 100)}% |
- ${device.TotalMemory.toLocaleString()} |
+ ${EncodeForHTML(device.TotalMemory.toLocaleString())} |
@@ -155,7 +156,7 @@ export function RenderDeviceRows() {
(recordRow.querySelector(".device-chat-button") as HTMLButtonElement).onclick = (ev) => {
ev.preventDefault();
ev.stopPropagation();
- CreateChatWindow(device.ID, device.DeviceName);
+ CreateChatWindow(device.ID, EncodeForHTML(device.DeviceName));
};
(recordRow.querySelector(".device-remotecontrol-button") as HTMLButtonElement).onclick = (ev) => {
ev.preventDefault();
diff --git a/Server/wwwroot/src/Main/HubConnection.ts b/Server/wwwroot/src/Main/HubConnection.ts
index 7196573e..7a8a99e6 100644
--- a/Server/wwwroot/src/Main/HubConnection.ts
+++ b/Server/wwwroot/src/Main/HubConnection.ts
@@ -10,6 +10,7 @@ import { MainApp } from "./App.js";
import { AddConsoleOutput, AddConsoleHTML } from "./Console.js";
import { ReceiveChatText } from "./Chat.js";
import { ShowMessage, ShowModal } from "../Shared/UI.js";
+import { EncodeForHTML } from "../Shared/Utilities.js";
export var Connection: any;
@@ -43,14 +44,15 @@ export function Connect() {
function applyMessageHandlers(hubConnection) {
hubConnection.on("Chat", (deviceID: string, deviceName: string, message: string, disconnected: boolean) => {
+ var encodedMessage = EncodeForHTML(message);
if (disconnected) {
AddConsoleHTML(`${deviceName} disconnected from chat.`);
}
else if (message) {
- AddConsoleHTML(`Chat from ${deviceName}: ${message}`);
+ AddConsoleHTML(`Chat from ${deviceName}: ${encodedMessage}`);
}
- ReceiveChatText(deviceID, deviceName, message, disconnected);
+ ReceiveChatText(deviceID, deviceName, encodedMessage, disconnected);
});
hubConnection.on("UserOptions", (options: UserOptions) => {
MainApp.UserSettings.CommandModeShortcuts.Web = options.CommandModeShortcutWeb;
diff --git a/Utilities/Install-RemotelyServer.ps1 b/Utilities/Install-RemotelyServer.ps1
index c0f80da2..1aa65584 100644
--- a/Utilities/Install-RemotelyServer.ps1
+++ b/Utilities/Install-RemotelyServer.ps1
@@ -372,8 +372,10 @@ Start-Website -Name $SiteName
### SSL certificate installation. ###
-if ($WacsPath -ne $null -and (Test-Path -Path $WacsPath)) {
- &"$WacsPath" --target iis --siteid (Get-Website -Name $SiteName).ID --installation iis --emailaddress $EmailAddress --accepttos
+if ($WacsPath) {
+ if (Test-Path -Path $WacsPath) {
+ &"$WacsPath" --target iis --siteid (Get-Website -Name $SiteName).ID --installation iis --emailaddress $EmailAddress --accepttos
+ }
}
Wrap-Host
|