MacPass icon indicating copy to clipboard operation
MacPass copied to clipboard

Global Autotype on HTTP authentication

Open chuenniger opened this issue 10 years ago • 17 comments
trafficstars

Hi

The Global Autotype doesn't work on HTTP Authentication. The title of the page is correct. Is it possible to use the Autotype for this?

Regards, Christian

chuenniger avatar Jan 21 '15 20:01 chuenniger

Currently MacPass only looks for the front most window and it's title. If an http authentication sheet is displayed, my guess is it's the front most window and has no title. I've encountered this too (1Password 4 e.g. does not handle those as well as far as i know, 5 might be better, haven't tested it yet). If it's possible for me to get a parent window I might just fall back to that title but this might yield problems in other scenarios. Granted though the http-auth one might be the most frequent use case for this.

mstarke avatar Jan 23 '15 11:01 mstarke

To confirm my suspicion I just tested this with safari and it works, as I throw away any windows without a title and the http-auth window has not title MacPass falls back to the window title of the main window an then should find a match.

Can you confirm it's not working with Safari? Other browsers might be different. Will see what comes up there.

mstarke avatar Jan 23 '15 11:01 mstarke

@chuenniger did you have the time to check if my observations are correct for you as well?

mstarke avatar Feb 07 '15 18:02 mstarke

@mstarke, I tried Safari, Chrome and Firefox and they behaved similarly. I do notice though that Window title as the only criterion for match is a bit of a problem: It might be me (and the http-auth protected webpages I am visiting) but the window title is not so obviously well-defined. On first hit to the URL, I often don;t know what the window (or browser-tab) title is. I just get a “No Match!” notice. Could it maybe say, “No Match for blah!” so I can at least adjust my title in the database? What I can do is proceed with empty passwords and then I get the expected 401 Unauthorized. On reload, I get presented with the HTTP-auth dialog again and this time I can achieve a match by having my window title set to “401 Unauthorized” (works for Firefox, Chrome and Safari) but that of course means all my http-auth have that choice…

So, in the short run I wonder how I can figure out the appropriate window title and in the long run, I would really like further match criteria for global auto type (e.g. authentication realm for http-auth? not sure that’s so easily accessible).

DrSAR avatar Apr 07 '15 07:04 DrSAR

@DrSAR thank you for the analysis. The "no match for…" suggestion is a good point. Will be added.

Since auto type is designed to work only via window title and nothing else, your wish will stay a wish. But since this is a browser issue the KeePassHTTP solution might work. I have no idea if the browser plugin can handle the auth-windows but this might be worth a try.

mstarke avatar Apr 07 '15 10:04 mstarke

Take a look at my small modification https://github.com/velichkin/MacPass/commit/98135e9ede801c36ab94e9c8eb37e3436193efbb

It's unperfect, but it works. In few words - window title of chrome's http auth window is "Window". I use this information and "flag" in item notes named "allowEmptyWindowAutoType".

velichkin avatar Sep 06 '15 21:09 velichkin

is there any news on this issue?

23tux avatar Aug 16 '19 08:08 23tux

Not for now but it's on the list of things to fix ASAP.

mstarke avatar Aug 16 '19 09:08 mstarke

I noticed with the AutotypeURL plugin if the page was previously loaded. It will work. o there is a in between page before the http airy window displays

georgesnow avatar Aug 16 '19 10:08 georgesnow

I've just tried to get the title via accessibilty options. It's not very easy and will requries custom code for every browser. I guess this is a good place for AutotypeURL to expand it's capabilities and leave MacPass as is.

@georgesnow Using the Accessibility Inspector yields a good path on how to find out the url which is displayed in the http-Auth dialog but this might break with newer versions of browsers.

mstarke avatar Aug 16 '19 10:08 mstarke

Sounds good. I will take a look. it will probably be next week. Is there a webpage that I can test again?

georgesnow avatar Aug 16 '19 11:08 georgesnow

@mstarke @23tux so the AutotypeURL plugin works for HTTP auth pages. I don't have chrome installed, but it definitely works with safari.

test page: https://jigsaw.w3.org/HTTP/

tested on both these:

Basic Authentication test Digest Authentication test

georgesnow avatar Aug 16 '19 17:08 georgesnow

@georgesnow sorry for the delay, have overlooked this issue. I tried the AutotypeURL plugin, but it seems like the prebuild version needs 0.7.10 (which is not released yet?) and I only have 0.7.9. Any hints when 0.7.10 will be available?

23tux avatar Oct 19 '19 08:10 23tux

I am currently short on spare time but am trying to get 0.7.10 notarized and published. This might take some time but I hope to get everything out in two weeks tops.

mstarke avatar Oct 19 '19 12:10 mstarke

The AutotypeURL plugin will also work with the current continuous build. You have to allow for incompatible plugins though.

mstarke avatar Oct 19 '19 12:10 mstarke

@23tux i believe you need to use the continuous build and you can download the compatible plugin through plugin preference pane in Macpass. I did notice with these types of pages when you open safari and haven’t gone to any other Url. safari doesn’t provide the url to the AppleScript. L I noticed in 10.15 (Catalina) it crashed MacPass because of that. So the plugin might need to be tweaked. I don’t think in 10.14 this issue happened I believe it just said no match because it was just a empty string

georgesnow avatar Oct 19 '19 12:10 georgesnow

For issues related to AutotypeURL those should be reported for the project to trac them. I just did notarize MacPass so it might be possible to release 0.7.10 sooner than I thought.

mstarke avatar Oct 19 '19 16:10 mstarke