anonymous1184/bitwarden-autotype

Autotype Obfuscation missing every 3rd character

dovry opened this issue · 6 comments

dovry commented

With Autotype Obfuscation the autotyper misses around every 3rd character, with input fields filled like this

original:
    username@email.com
AO enabled:
    usnae@eail.com

Tested with notepad, citrix workspace and a couple of game launchers.

I wouldn't be surprised if the app fails sending keystrokes to Citrix because it's a rather picky environment, what surprises me a lot is Notepad as is the de facto test bench for this kind of stuff given how simple it is.

I've been trying to replicate but I haven't been able. I created a test user and a clone for Notepad in order to have the "Entry Selector" shown:

20220322123743

And here's a gif of the auto-type:

Video

In your case seems like the obfuscation only does the first half (paste) and fails to continue with the later (move to the left and type the remaining characters). Can you give me more details of your environment?

Edit: the part that is pasted will always be different for each user, that's why even if I used the same email it doesn't match your output.

dovry commented

I reinstalled windows (was due anyway) and now notepad is working like it's supposed to
notepad_oirw5wCNLX
Game launchers and various other programs do not work, so I guess you can close the issue.

Sidenote; there's a 50/50 chance that applications are recognized by the URI, so as you can see in the gif I've used 3 different methods. Got any tips for that?

I'd love to get to the bottom of this before closing the issue as it will let you fully use the app (as intended) and let me fix any potential issue.

If you are using the portable version and the applications you want to interact with are elevated (running as Administrator) you won't be able to interact with them. That is a Windows security measure, is better to have the Auto-Type application installed as it will let you interact with those windows without having to elevate the application itself (the rule of thumb of security is: the less applications running with unneeded privileges, the better).

The other option would be to simply elevate the Auto-Type app by right clicking and then selecting "Run as Administrator", however, like I've said the previous method is preferred.

If you think the issue is the window detection, here's a brief explanation of the rules:

Using only the application executable.

With an added URL like Notepad.exe every time you hit one of the auto-type shortcuts when Notepad is active, the auto-type sequence selected will be issued.

Compatible syntheses: app://Notepad.exe and winapp://Notepad.exe

Using a Window Title (partial match).

If the above behavior is not desired and the intention is to only auto-type when the application is displaying a specific title, you can add any of the following:

  • Untitled - Notepad
  • app://Untitled - Notepad
  • winapp://Untitled - Notepad

Bear in mind that a match is considered positive if the window title has at least that string. In the Notepad example means that a recently opened window will match and a window with unsaved changes (ie, the title changed to * Untitled - Notepad) will also match.

Using a Window Title (exact match).

If you want to match * Untitled - Notepad but not Untitled - Notepad use:

  • app://?title=* Untitled - Notepad
  • winapp://?title=* Untitled - Notepad

Using a Window Class.

If you know the specifics of the application you're dealing with and suits to use the class rather than a title (titles can change, classes hardly do):

  • app://?class=Notepad
  • winapp://?class=Notepad

This last one is on the "advanced" spectrum of a match and most people won't ever need it as the very first option is more than adequate for the vast majority of the cases.

dovry commented

Adding entries to bitwarden as you can see on the left side, will work at most one time. Restarting bwautotyper, the application, the whole computer and resyncing the inventory doesn't help.
I should note that all the entries in the screenshot are at least a few days old, so it's not a sync issue.

I installed the bwautotyper to use on game clients, and it's quite unfortunate that it's not working :^)
image

Thank you for such thorough testing, that gave me the edge to pinpoint the issue.

However in this case seems to be related to Bitwarden's issue #490 (just added a comment with something odd I found).

I could replicated the issue and solved it in two ways.

For versions greater than 1.19.1:

  • Logout.
  • Login.
  • Sync.

For versions equals or less than 1.19.1:

  • Close Auto-Type.
  • Delete %AppData%\Auto-Type\data.json.
  • Login.

After that I downloaded, installed the client and created a RuneScape account and I was able to login.

Hopefully Bitwarden team solves the empty list of item issue soon. Other than that I might add a check and provide information and possible fixes for the user.

Thanks again for your time.

dovry commented

Thanks for troubleshooting and finding out what was wrong. Now it picks up all entries with the runescape launcher (and types into citrix too)
image

Method 1 - no change

Method 2 - deleting %AppData%\Auto-Type\data.json solved the problem (for now), even though I'm using bw-cli 1.21.1.0

image
image