1) Ensure that the autofocus is on the input control for the master password and server password dialogs. Fixes #7633

2) Fixed an XSS vulnerability in the Hostname/Address control in the Server Connection dialog.
This commit is contained in:
Nikhil Mohite
2022-08-22 15:58:17 +05:30
committed by Akshay Joshi
parent 2de89dcaaf
commit 5c04f1aa2e
4 changed files with 8 additions and 6 deletions

View File

@@ -47,8 +47,8 @@ export default function ConnectServerContent({closeModal, data, onOK, setHeight}
useEffect(()=>{
setTimeout(()=>{
firstEleRef.current && firstEleRef.current.focus();
}, 275);
}, []);
}, 350);
}, [firstEleRef.current]);
useEffect(()=>{
setHeight?.(containerRef.current?.offsetHeight);

View File

@@ -49,8 +49,8 @@ export default function MasterPasswordContent({ closeModal, onResetPassowrd, onO
useEffect(() => {
setTimeout(() => {
firstEleRef.current && firstEleRef.current.focus();
}, 275);
}, []);
}, 350);
}, [firstEleRef.current]);
useEffect(() => {
setHeight?.(containerRef.current?.offsetHeight);

View File

@@ -472,7 +472,7 @@ function SchemaDialogView({
if(message) {
setFormErr({
name: path,
message: message,
message: _.escape(message),
});
}
});
@@ -642,7 +642,7 @@ function SchemaDialogView({
console.error(err);
setFormErr({
name: 'apierror',
message: parseApiError(err),
message: _.escape(parseApiError(err)),
});
}).finally(()=>{
if(checkIsMounted()) {