diff --git a/agent/vendors.php b/agent/vendors.php
index e14886b39..3ef74ce05 100644
--- a/agent/vendors.php
+++ b/agent/vendors.php
@@ -178,7 +178,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
$vendor_email = escapeHtml($row['vendor_email']);
$vendor_website = escapeHtml($row['vendor_website']);
if ($vendor_website) {
- $vendor_website_display = "$vendor_website ";
+ $vendor_website_display = "$vendor_website ";
} else {
$vendor_website_display = "-";
}
diff --git a/css/itflow_custom.css b/css/itflow_custom.css
index 700ea00da..84fe31225 100644
--- a/css/itflow_custom.css
+++ b/css/itflow_custom.css
@@ -3638,7 +3638,13 @@ img.itflow-asset-icon {
line-height: 1.4;
}
-/* Copy button beside an IP / MAC / serial - quiet until the row is pointed at */
+/* Copy button beside a value - an IP, MAC, serial, email, username, URI or a
+ password. Quiet until the row or line it sits in is pointed at: a table row,
+ a list-group row, a quick-look line, or just its own parent element.
+ .itflow-copy-always keeps it showing where copying is the point (an MFA
+ secret). Markup:
+
+ Copy buttons attached to an input stay input-group buttons. */
.itflow-copy {
margin-left: .3rem;
padding: 0 .15rem;
@@ -3650,6 +3656,9 @@ img.itflow-asset-icon {
transition: opacity .12s ease-in-out;
}
tr:hover .itflow-copy,
+.list-group-item:hover .itflow-copy,
+.itflow-glance-item:hover .itflow-copy,
+:hover > .itflow-copy,
.itflow-copy-always .itflow-copy,
.itflow-copy:focus-visible {
opacity: 1;
diff --git a/js/app.js b/js/app.js
index b822d9126..d4d68102e 100644
--- a/js/app.js
+++ b/js/app.js
@@ -607,8 +607,11 @@ function itflowInit() {
});
// Copy buttons: any element with class="clipboardjs" and its text in
- // data-clipboard-text. That is ClipboardJS's markup contract, kept so none of
- // the call sites change - the library itself is no longer used here.
+ // data-clipboard-text, or the field to copy from in data-clipboard-target.
+ // That is ClipboardJS's markup contract, kept so none of the call sites
+ // change - the library itself is no longer used here. Beside a value they
+ // are the small .itflow-copy icon that shows when its row is pointed at
+ // (css/itflow_custom.css); beside an input, an input-group button.
//
// ClipboardJS copies by selecting a hidden textarea. Under Bootstrap 5 that
// textarea has to be inside the open modal or the focus trap pulls focus
@@ -632,7 +635,12 @@ function itflowInit() {
const trigger = this;
const target = itflowCopyFeedbackTarget(trigger);
- const text = trigger.getAttribute('data-clipboard-text') || '';
+ // data-clipboard-target="input[name=uri]" copies what is in that
+ // field now - in its own input group first - rather than the value
+ // the page was drawn with, so an edited field copies the edit
+ const source = trigger.getAttribute('data-clipboard-target');
+ const field = source ? ((trigger.closest('.input-group') || document).querySelector(source) || document.querySelector(source)) : null;
+ const text = field ? (field.value || '') : (trigger.getAttribute('data-clipboard-text') || '');
// An empty field would otherwise wipe whatever is on the clipboard
if (text === '') {