Chrome Username Fill for Documentation URL

Has anyone else noticed Chrome fills your saved username in the “Documentation URL” field. It is just a little annoyance, but it bites me over and over again it seems.

6 Likes

Yup, does the same for me, and has already been reported here… and Chrome does it so stubbornly for me, every time I edit a rule or create a new one, it is auto-filled in and I have to clear the field, but sometimes Chrome still sneaks it in again before I save.

I’ve googled a bit and allegedly, a possible solution is to click the “clear cache” button on the chrome://autofill-internals page, followed by closing and re-opening affected tabs. This seems to do the trick for me, I have yet to see for how long. Clicking in the documentation URL field still opens some suggestions, but they look more like “text I have entered into this field in the past” suggestions than a list of usernames Chrome knows, so it might actually have worked.

OK, the cache clear at chrome://autofill-internals did not really work, the behavious is back :frowning:

I have the same for no reason on different PCs :confused: I fix this and after some time, the issue is back :frowning:

Guys - is it possible to get a solution for this? It’s really bothersome.

autocomplete=“off” or something simple like that would eventually solve the problem.

2 Likes

Experiencing this with Edge (Chromium).

Has anyone found a solution/workaround for this annoying issue with the Document URL populating the username?

@theyken could you have a look?

Any news here? It’s like pain the ***** - Everytime I have to change something I have to delete the username. But if the change takes more seconds, I have to delete the username again out of the document url field.

I am not a Chrome user, but shouldn’t it be possible to tell Chrome not to autofill on your monitoring URL?

It’s not working to deactivate autofill only on one element. I checked this page with a web developer from my company and he said, that the code on this page is wrong which chrome autofill the password in the documentation field.

I installed Tampermonkey and created a script with a “delete autofill” but it’s not the best workaround for that situation.

And since I’m not the only person, maybe the CheckMK team should have an eye on this

1 Like

I meant a whole URL (e.g., my.monitoring.tld) and not a single element.

We have it on our radar and will look into it soonish. We will keep you posted on the matter.

1 Like

Unfortunately it’s not possible, because save all for the same subdomain (*.domain.tld) and on my company we have a lot of service running on the same domain.

I hope the CheckMK team can find a problem as soon as possible :slight_smile:

Here it would be nice to know what should be wrong.

1 Like

A few observations, if it helps anyone (on CRE 2.3.0p15):

For me, it seems to happen on most rule edit pages, but not all:

  • when I edit or add a rule in Setup ➜ Services[HTTP, TCP, Email, ...] ➜ Check TCP port connection, I get the automatic population of the “documentation URL” field with my username
  • when I edit or add a rule in Setup ➜ Services[HTTP, TCP, Email, ...] ➜ Check email delivery, it does not happen and works as expected

Yet, on both pages,

  • the HTML for the field is identical
  • the main page URL path is identical (index.py with parameters)
  • the iframe URL path is identical (wato.py with parameters)

The same thing happens if I open the wato.py URL directly, so I opened an “add rule” page in both rule overview pages, and sure enough, it happend on one, but not the other.

URLs compared:

no bug: https://checkmk.ourdomain.tld/mysite/check_mk/wato.py?csrf_token=(identical token removed)&filled_in=new_rule&ruleset_back_mode=rulesets&rule_folder=&varname=active_checks%3Amail_loop&mode=new_rule&folder=&_new_dflt_rule=SET
bug   : https://checkmk.ourdomain.tld/mysite/check_mk/wato.py?csrf_token=(identical token removed)&filled_in=new_rule&ruleset_back_mode=rulesets&rule_folder=&varname=active_checks%3Atcp&mode=new_rule&folder=&_new_dflt_rule=SET

On a page where this bug happens, when I remove the username and click into the field, Chrome opens a long list of user/pass combinations with a “manage passwords…” button at the bottom, just like it does on regular username or password fields:

When I click into an (empty) documentation URL field on a rule page without the bug happening, it opens a regular autofill/remembered inputs list that looks like a speech bubble. This list is much smaller and contains things that I’ve put into this field in the past:
image
More importantly though, it does not automatically populate the field. We can surely agree that this is the expected behaviour.

I added autocomplete="off" to the input field (in lib/check_mk/gui/valuespec.py), but the bug still occurs. It stopped the actual remembered inputs popup (second screenshot) from appearing when I focus the field though. I also tried "false" but that didn’t stop the bug either.

Autofill in Chrome/Chromium seems to be a mess. This might be related: html - Disabling Chrome Autofill - Stack Overflow

The thread suggested using autofill="one-time-code", and just to test, I used that instead of "off", and on the page affected by the bug, it results in the first text input (“Description”) now being auto-filled with my username instead. :crazy_face:

I found something: the input field gets autofilled when there’s a “hidden” password field. I don’t know why it would be there.

image

If I remove the “display:none” bit on these two input elements, they appear right at the top of the second big collapsible element:

I copied the frame source into a static html page to be able to toy around with it, and if I comment out that password input element, the documentation URL field is no longer being autofilled with my username on page load.

Now interestingly, these two hidden inputs (not type=hidden, just display:none) also exist on pages where the autofill does not occur (like the aforementioned “Add rule: Check email delivery” page. I assume this is because this page actually has a proper username/password input field combination further below:
image

Ok, found a workaround.

The function responsible for the hidden input fields that cause the “Documentation URL” field to be autofilled with the username is in the file /opt/omd/versions/default/lib/python3/cmk/gui/htmllib/html.py and looks like this:

The two lines starting with self.input add the fields. My workaround is to comment them out and add a pass (python’s no-op command) so the function is not empty:

def prevent_password_auto_completion(self) -> None:
    # These fields are not really used by the form. They are used to prevent the browsers
    # from filling the default password and previous input fields in the form
    # with password which are eventually saved in the browsers password store.
    #self.input(name=None, type_="text", style="display:none;")
    #self.input(name=None, type_="password", style="display:none;")
    pass

After the change, a omd restart apache was necessary.

Ironically, according to the comment in the function, the fields were added to prevent an issue with autofill, but for me and others, they actually caused an issue with it.

I’ll apply this workaround to all instances I am working with and see if that causes other autofill issues (that the function was meant to solve).

1 Like

its not only chrome, have had the same problems in MS Edge and Safari.
Its super annoying, for once all rules will get a documentation icon and it only contains my username…

In Safari I can disable autocomplete for a specific fqdn but I have not found a solution for other browsers (and Mac is not our main platform at work)

Hi all!

I have news :slight_smile:

This will be fixed in 2.4. No backport to 2.3 unfortunately: Werk #17490: Prevent Google Chrome from auto-filling non login related input fields

Sadly, it seems that there is no promise that Chrome and Chrome-based browsers will not change the behaviour (described in werk), but we will try to keep an eye on it.

2 Likes