Hardening clipboardData handling in EnsInput (#11822)

feature/default_network_editable
ryanml 3 years ago committed by GitHub
parent e0692db7ba
commit 428b86fcf3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      ui/pages/send/send-content/add-recipient/ens-input.component.js

@ -36,7 +36,9 @@ export default class EnsInput extends Component {
}
onPaste = (event) => {
event.clipboardData.items[0].getAsString((text) => {
if (event.clipboardData.items?.length) {
const clipboardItem = event.clipboardData.items[0];
clipboardItem?.getAsString((text) => {
const input = text.trim();
if (
!isBurnAddress(input) &&
@ -45,6 +47,7 @@ export default class EnsInput extends Component {
this.props.onPaste(input);
}
});
}
};
onChange = ({ target: { value } }) => {

Loading…
Cancel
Save