keepassxc/src
Carlo Teubner 22811471ac
Improve Entry placeholder resolution (#10846)
* Entry placeholder resolution: don't overdo it

After resolving placeholders, previously the code would do it all over again if anything had changed, multiple times up to the recursion limit. This would have the effect of applying a much greater recursion limit, which is confusing and unnecessary, and probably undesired.

* Entry tweaks and minor refactoring

- Entry::size(): when computing tag size, use same delimiter set as in other places in the code
- Factor tag delimiter set regex out into global constant
- Placeholder resolution: remove unnecessary special casing for self-referential placeholders (these are taken care of by existing recursion depth limit)
- Placeholder resolution: less wasteful string building loop
- Move some constants from being public static data members of Entry to being local to Entry.cpp (in anonymous namespace)
- Migrate some QRegEx instances to QRegularExpression, the modern alternative
- Miscellanous minor code cleanups

* Entry: fix hitting recursion limit with {braces}

When encountering a {brace-enclosed} substring, the placeholder resolution logic would previously keep recursing until it hit the recursion depth limit (currently 10). This would lead to "Maximum depth of replacement has been reached" messages, and was also wasting CPU cycles.

Fixes #1741

---------

Co-authored-by: Jonathan White <support@dmapps.us>
2024-06-16 17:20:16 -04:00
..
autotype Reduce complexity of {CLEARFIELD} on Linux 2024-04-29 09:52:51 -04:00
browser Passkeys: Fix incorrect username fill 2024-06-16 17:10:17 -04:00
cli Fix broken build when using system zxcvbn (#10717) 2024-06-02 07:37:34 -04:00
core Improve Entry placeholder resolution (#10846) 2024-06-16 17:20:16 -04:00
crypto Botan: don't call deprecated functions (#10826) 2024-06-02 07:38:50 -04:00
fdosecrets Cleanup compiler warnings on all platforms (#10847) 2024-06-16 17:09:48 -04:00
format Fix encryption settings behavior 2024-06-16 17:13:11 -04:00
gui Improve overall database settings behavior 2024-06-16 17:19:57 -04:00
keeshare Prevent KeeShare from merging database custom data 2024-04-29 09:53:20 -04:00
keys Fix issues with Hardware Key auto detection 2024-05-05 16:33:23 -04:00
post_install Run macdeployqt only once at install time 2022-03-21 00:15:57 +01:00
proxy Add support for Botan3 (#8994) 2023-05-07 23:19:18 -04:00
qrcode Removing QWidget dependency from src/core. 2021-11-12 07:41:30 -05:00
sshagent Fix SSH Agent broken decrypt button (#10638) 2024-06-02 07:35:25 -04:00
streams Optimize includes across code base 2021-07-13 22:08:33 -04:00
thirdparty Fix broken build when using system zxcvbn (#10717) 2024-06-02 07:37:34 -04:00
touchid Fix TouchID not being shown after lid close 2024-03-09 15:21:46 -05:00
updatecheck Optimize includes across code base 2021-07-13 22:08:33 -04:00
winhello Properly handle Windows Hello errors 2023-02-19 08:28:59 -08:00
CMakeLists.txt Fix broken build when using system zxcvbn (#10717) 2024-06-02 07:37:34 -04:00
config-keepassx.h.cmake Add basic support for WebAuthn (Passkeys) (#8825) 2024-01-30 18:26:45 -05:00
git-info.h.cmake Cleanup CMakeFiles prior to release 2019-01-30 15:03:03 -05:00
main.cpp Correct minor issues in translations 2024-04-29 09:51:52 -04:00