diff --git a/pkg/storaged/crypto-keyslots.jsx b/pkg/storaged/crypto-keyslots.jsx
index a90a8eb38408..ca9fd1954dff 100644
--- a/pkg/storaged/crypto-keyslots.jsx
+++ b/pkg/storaged/crypto-keyslots.jsx
@@ -515,6 +515,7 @@ function add_dialog(client, block) {
{
visible: vals => !client.features.clevis || vals.type == "luks-passphrase",
validate: val => !val.length && _("Passphrase cannot be empty"),
+ new_password: true
}),
PassInput("new_passphrase2", _("Repeat passphrase"),
{
@@ -523,7 +524,8 @@ function add_dialog(client, block) {
return (vals.new_passphrase.length &&
vals.new_passphrase != val &&
_("Passphrases do not match"));
- }
+ },
+ new_password: true
}),
TextInput("tang_url", _("Keyserver address"),
{
@@ -560,9 +562,15 @@ function edit_passphrase_dialog(block, key) {
{ validate: val => !val.length && _("Passphrase cannot be empty") }),
Skip("medskip"),
PassInput("new_passphrase", _("New passphrase"),
- { validate: val => !val.length && _("Passphrase cannot be empty") }),
+ {
+ validate: val => !val.length && _("Passphrase cannot be empty"),
+ new_password: true
+ }),
PassInput("new_passphrase2", _("Repeat passphrase"),
- { validate: (val, vals) => vals.new_passphrase.length && vals.new_passphrase != val && _("Passphrases do not match") })
+ {
+ validate: (val, vals) => vals.new_passphrase.length && vals.new_passphrase != val && _("Passphrases do not match"),
+ new_password: true
+ })
],
Action: {
Title: _("Save"),
diff --git a/pkg/storaged/dialog.jsx b/pkg/storaged/dialog.jsx
index f036ee845ac1..3bc707515d1c 100644
--- a/pkg/storaged/dialog.jsx
+++ b/pkg/storaged/dialog.jsx
@@ -233,7 +233,8 @@ import { TextInput as TextInputPF4 } from "@patternfly/react-core/dist/esm/compo
import { Popover } from "@patternfly/react-core/dist/esm/components/Popover/index.js";
import { HelperText, HelperTextItem } from "@patternfly/react-core/dist/esm/components/HelperText/index.js";
import { List, ListItem } from "@patternfly/react-core/dist/esm/components/List/index.js";
-import { ExclamationTriangleIcon, InfoIcon, HelpIcon } from "@patternfly/react-icons";
+import { ExclamationTriangleIcon, InfoIcon, HelpIcon, EyeIcon, EyeSlashIcon } from "@patternfly/react-icons";
+import { InputGroup } from "@patternfly/react-core/dist/esm/components/InputGroup/index.js";
import { show_modal_dialog, apply_modal_dialog } from "cockpit-components-dialog.jsx";
import { ListingTable } from "cockpit-components-table.jsx";
@@ -563,6 +564,27 @@ export const TextInput = (tag, title, options) => {
};
};
+const PassInputElement = ({ tag, title, options, val, change, validated }) => {
+ const [show, setShow] = useState(false);
+
+ return (
+
+ change(value)} />
+
+ );
+};
+
export const PassInput = (tag, title, options) => {
return {
tag,
@@ -571,12 +593,12 @@ export const PassInput = (tag, title, options) => {
initial_value: options.value || "",
render: (val, change, validated) =>
- change(value)} />
+
};
};
diff --git a/pkg/storaged/format-dialog.jsx b/pkg/storaged/format-dialog.jsx
index 4c6f287b7a50..79460661ec41 100644
--- a/pkg/storaged/format-dialog.jsx
+++ b/pkg/storaged/format-dialog.jsx
@@ -330,6 +330,7 @@ function format_dialog_internal(client, path, start, size, enable_dos_extended,
return _("Passphrase cannot be empty");
},
visible: vals => is_encrypted(vals) && vals.crypto != " keep",
+ new_password: true
}),
PassInput("passphrase2", _("Confirm"),
{
@@ -338,6 +339,7 @@ function format_dialog_internal(client, path, start, size, enable_dos_extended,
return _("Passphrases do not match");
},
visible: vals => is_encrypted(vals) && vals.crypto != " keep",
+ new_password: true
}),
CheckBoxes("store_passphrase", "",
{
diff --git a/pkg/storaged/stratis-panel.jsx b/pkg/storaged/stratis-panel.jsx
index 2fc3d047e9a7..18b4b2b46a5a 100644
--- a/pkg/storaged/stratis-panel.jsx
+++ b/pkg/storaged/stratis-panel.jsx
@@ -131,7 +131,8 @@ export function create_stratis_pool(client) {
if (phrase === "")
return _("Passphrase cannot be empty");
},
- visible: vals => vals.encrypt.on
+ visible: vals => vals.encrypt.on,
+ new_password: true
}),
PassInput("passphrase2", _("Confirm"),
{
@@ -139,7 +140,8 @@ export function create_stratis_pool(client) {
if (phrase2 != vals.passphrase)
return _("Passphrases do not match");
},
- visible: vals => vals.encrypt.on
+ visible: vals => vals.encrypt.on,
+ new_password: true
})
]
}),
diff --git a/test/reference b/test/reference
index aad9a2333159..916d02f7be01 160000
--- a/test/reference
+++ b/test/reference
@@ -1 +1 @@
-Subproject commit aad9a2333159c2bead696942955df2fc30f02a92
+Subproject commit 916d02f7be011a883831de8a62f4f46be91b6c9c