Keepassxc-browser: "Not a valid MatchPattern" when adding a site preference for subdomain.fe.vendor.tld

Created on 2 Aug 2018  路  7Comments  路  Source: keepassxreboot/keepassxc-browser

Expected Behavior

I should not get console errors.

Current Behavior



I'm seeing a console error:

Uncaught (in promise) TypeError: https://subdomain.fe.myvendor.de is not a valid MatchPattern
    at matchPatternToRegExp (global.js:48)
    at siteMatch (global.js:91)
    at browser.runtime.sendMessage.then (keepassxc-browser.js:1431)

Steps to Reproduce (for bugs)


  1. Add a site preference for a domain like subdomain.fe.vendor.tld
  2. Open any website and look into the console

Debug info


KeePassXC - 2.3.3
keepassxc-browser - 1.2.0
Operating system: Mac
Browser: Chrome
Proxy used: NO

PR pending bug

Most helpful comment

@rkfg That's exactly what happens. Luckily that will be fixed in the next version.

All 7 comments

Does your original URL match this document?
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Match_patterns

You can try to modify the URL to form *://*.vendor.tld/*

What do you mean by "match this document"?

I'd like to block this specific subdomain though. *://subdomain.*.vendor.tdl or *://subdomain.*.vendor.tdl/* didn't work as well.

I mean does your URL match the Match Pattern structure described in the page.

https://mozilla.*.org/ is an invalid match pattern. "*" in host must be at the start.. As you can see, this implementation is not perfect, but it's a start. Do you know any real URL that corresponds the URL you are using so I could test it?

Narrowed it down a bit: The url actually was https://subdomain.fe.vendor.tld (without a / at the end). It does work with a slash at the end. But the entry was added by clicking on "never ask for this page again".

That's actually a bug then. The slash is added to the URL if put manually from the options page. Missed the notification addition, and it's possible that it won't append the slash to the end. Thanks for noticing it!

Also, when this error happens the entire extension breaks, i.e. it doesn't fill the fields anymore and doesn't suggest any credentials on _any_ site. Indeed, it only happens after clicking "never ask for this page again" and it doesn't when manually adding the same URL (even without the slash in the end). I managed to fix it by removing the offending entry from site preferences.

I guess this explains the negative reviews on Chrome Web Store.

@rkfg That's exactly what happens. Luckily that will be fixed in the next version.

Was this page helpful?
0 / 5 - 0 ratings