-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
198889c
commit 9ab03a5
Showing
6 changed files
with
191 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (C) 2023 KeePassXC Team <[email protected]> | ||
* Copyright (C) 2024 KeePassXC Team <[email protected]> | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -24,6 +24,8 @@ | |
#include <QRegularExpression> | ||
#include <QUrl> | ||
|
||
const QString UrlTools::URL_WILDCARD = "1kpxcwc1"; | ||
|
||
Q_GLOBAL_STATIC(UrlTools, s_urlTools) | ||
|
||
UrlTools* UrlTools::instance() | ||
|
@@ -137,8 +139,9 @@ bool UrlTools::isUrlIdentical(const QString& first, const QString& second) const | |
return false; | ||
} | ||
|
||
const auto firstUrl = trimUrl(first); | ||
const auto secondUrl = trimUrl(second); | ||
// Replace URL wildcards for comparison if found | ||
const auto firstUrl = trimUrl(QString(first).replace("*", UrlTools::URL_WILDCARD)); | ||
const auto secondUrl = trimUrl(QString(second).replace("*", UrlTools::URL_WILDCARD)); | ||
if (firstUrl == secondUrl) { | ||
return true; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters