mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-02-05 00:29:40 +03:00
Bitwarden picks wrong credentials with a unique regex? #375
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @testeron7 on GitHub (Aug 13, 2019).
Regulair Expression:
^https://\b(\wtest1\w)\b.demo.com/wp-login.php
Tested on:https://regex101.com
https://test.demo.com/wp-login.php (no match)
https://test1.demo.com/wp-login.php (match)
https://test2.demo.com/wp-login.php (no match
I would expect that it fills the unique URI https://test1.demo.com/wp-login.php
and not the credentials from https://test.demo.com/wp-login.php?
Any thoughts why?
@mprasil commented on GitHub (Aug 14, 2019):
I'm not entirely sure what you want to achieve. If you want to match the test1 URL, you probably need to write the regexp like this:
(Note the missing
\w)Although I'm not sure what you're trying to achieve here. Most of the complexity of the regexp is completely unnecessary, you don't need
\b(word boudary) as you're matching explicit character sequence anyways. You don't need to use the brackets as you're not going to use the capturing group. If you want to match anytestNsite but not the "plain"test.demo.comyou could just use something like:This will match
test1.demo.com,test2.demo.comor eventest34.demo.combut nottest.demo.com. ([0-9]+stands for one or more numbers)@testeron7 commented on GitHub (Aug 14, 2019):
mprasil thanks fro the reply,
I was on the wrong foot because default bitwarden is not set to exact match so tryed to solve it with a regex. Default on exact matching is for new users a better option in my opinion.
Oh and your regex is better then mine, thanks for the explanation.
I run bitwarden_rs (self-compiled) and it works great this far.
@mprasil commented on GitHub (Aug 15, 2019):
Great to hear the exact match works for you. I think the default is what it is as this was the only option way back when. Going to close this now.