Skip to content

Commit

Permalink
fix: patch the vulnerability CVE-2022-32969.
Browse files Browse the repository at this point in the history
fix: patch the vulnerability CVE-2022-32969

fix: patch the vulnerability CVE-2022-32969.
  • Loading branch information
slient-coder committed Aug 11, 2023
1 parent 7de0fb8 commit 7711caf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/ui/components/Input/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import bitcore from 'bitcore-lib';
import { isNull } from 'lodash';
import React, { CSSProperties, useEffect, useState } from 'react';

import { SATS_DOMAIN, UNISAT_DOMAIN } from '@/shared/constant';
Expand Down Expand Up @@ -65,12 +66,12 @@ const $baseInputStyle: CSSProperties = Object.assign({}, $textPresets.regular, {
});

function PasswordInput(props: InputProps) {
const { placeholder, style: $inputStyleOverride, ...rest } = props;
const { placeholder, containerStyle, style: $inputStyleOverride, ...rest } = props;
const [type, setType] = useState<'password' | 'text'>('password');
return (
<div style={$baseContainerStyle}>
<div style={Object.assign({}, $baseContainerStyle, containerStyle)}>
<input
placeholder={placeholder || 'Password'}
placeholder={isNull(placeholder) ? 'Password' : placeholder}
type={type}
style={Object.assign({}, $baseInputStyle, $inputStyleOverride)}
{...rest}
Expand Down
4 changes: 3 additions & 1 deletion src/ui/pages/Account/CreateHDWalletScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ function Step1_Import({
<Text text={`${index + 1}. `} style={{ width: 25 }} textEnd color="textDim" />
<Input
containerStyle={{ width: 80, minHeight: 25, height: 25, padding: 0 }}
style={{ width: 80 }}
style={{ width: 60 }}
value={_}
onPaste={(e) => {
handleEventPaste(e, index);
Expand All @@ -254,6 +254,8 @@ function Step1_Import({
}}
onKeyUp={(e) => handleOnKeyUp(e)}
autoFocus={index == curInputIndex}
preset={'password'}
placeholder=""
/>
</Card>
</Row>
Expand Down

0 comments on commit 7711caf

Please sign in to comment.