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
6 changes: 3 additions & 3 deletions src/nodes/openware-config/openware-config.html/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ RED.nodes.registerType<OpenwareConfigEditorNodeProperties>("openware-config", {
const node = this;
const host = $("#node-config-input-host").val();
const port = $("#node-config-input-port").val();
const username = $("#node-config-input-username").val();
let password = $("#node-config-input-password").val();
const username = $("#node-config-input-username").val() as string;
let password = $("#node-config-input-password").val() as (string | undefined);
if (password === "__PWRD__") {
password = undefined;
}

if (host && port && username && password) {
const url = `${host}:${port}/api/users/login?username=${username}&password=${password}`;
const url = `${host}:${port}/api/users/login?username=${encodeURIComponent(username)}&password=${encodeURIComponent(password)}`;
console.log("Refreshing session", url);
Copy link

Copilot AI Jun 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logging the complete URL including encoded credentials may expose sensitive information. Consider removing or redacting sensitive details from the log statement.

Suggested change
console.log("Refreshing session", url);
console.log("Refreshing session at", `${host}:${port}/api/users/login`);

Copilot uses AI. Check for mistakes.
const resp = await fetch(url);
const data = await resp.json();
Expand Down
Loading