Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto-Fill fails on SonicWall Firewalls #2169

Open
zimmbi opened this issue Apr 11, 2024 · 1 comment
Open

Auto-Fill fails on SonicWall Firewalls #2169

zimmbi opened this issue Apr 11, 2024 · 1 comment

Comments

@zimmbi
Copy link

zimmbi commented Apr 11, 2024

On SonicWall Gen7 Firewalls the "LOG IN" button isn't working after the chrome extensions fills the username and password fields.

Possible Solution

Currently it works with this method, maybe it can be integrated in the extension?

`
kpxc.setValueWithChange = function(field, value, forced = false) {
if (!forced && field.readOnly) {
return;
}

const simulateKeyEvent = function(elem, eventType, keyCode) {
    const event = new KeyboardEvent(eventType, {
        bubbles: true,
        cancelable: true,
        keyCode: keyCode,
        which: keyCode
    });
    elem.dispatchEvent(event);
};

const simulateInput = async function(elem, newValue) {
    elem.focus();
    for (let i = 0; i < newValue.length; i++) {
        const char = newValue.charAt(i);
        simulateKeyEvent(elem, 'keydown', char.charCodeAt(0));
        simulateKeyEvent(elem, 'keypress', char.charCodeAt(0));
        elem.value += char; // Add the character to the input value
        elem.dispatchEvent(new Event('input', { bubbles: true }));
        simulateKeyEvent(elem, 'keyup', char.charCodeAt(0));
        await new Promise(resolve => setTimeout(resolve, Math.random() * 40 + 10)); // Mimic human typing delay
    }
    elem.dispatchEvent(new Event('change', { bubbles: true }));
};

simulateInput(field, value);

};
`

Steps to Reproduce (for bugs)

  1. Go to SonicWall Firewall Login page (Gen 7)
  2. Automatically fill username and password
  3. Click "LOG IN"
@varjolintu varjolintu changed the title Autotype on SonicWall Firewalls Auto-Fill fails on SonicWall Firewalls Apr 11, 2024
@varjolintu varjolintu added the bug label Apr 11, 2024
@varjolintu
Copy link
Member

varjolintu commented Apr 11, 2024

I'm not really in favor adding any delays that mimics typing etc. but I can take a look if this can be fixed in some other way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants