summaryrefslogtreecommitdiffstats
path: root/src/webview.cpp
diff options
context:
space:
mode:
authorSimon Rettberg2025-09-25 14:22:31 +0200
committerSimon Rettberg2025-09-25 14:22:31 +0200
commitb4c3e8f820f818fc35c278e5eb67cb106f73c25f (patch)
treee2e9aec338c5f443074301fd3fe6cb4235332805 /src/webview.cpp
parentFix remaining deprecation warnings (diff)
downloadslxgreeter-b4c3e8f820f818fc35c278e5eb67cb106f73c25f.tar.gz
slxgreeter-b4c3e8f820f818fc35c278e5eb67cb106f73c25f.tar.xz
slxgreeter-b4c3e8f820f818fc35c278e5eb67cb106f73c25f.zip
Fix IdP list merging
Diffstat (limited to 'src/webview.cpp')
-rw-r--r--src/webview.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/webview.cpp b/src/webview.cpp
index c4995bd..d9a689d 100644
--- a/src/webview.cpp
+++ b/src/webview.cpp
@@ -100,7 +100,7 @@ WebView::WebView(QWidget* parent)
// Any url filtering, since many pages allow you to escape through different links
auto bl = Global::urlBlacklist();
auto wl = Global::urlWhitelist();
- _profile->setRequestInterceptor(new SlxUrlRequestInterceptor(urlListToRegExp(bl), urlListToRegExp(wl)));
+ _profile->setUrlRequestInterceptor(new SlxUrlRequestInterceptor(urlListToRegExp(bl), urlListToRegExp(wl)));
}
// Use our custom page to receive activity signals from injected JS
@@ -279,12 +279,11 @@ void WebView::installJsInjectionScript()
{
// If we should filter the list of allowed IdPs, inject the list into
// the page as JavaScript
- static QRegularExpression REGEX("[^\\w./:@-]", QRegularExpression::UseUnicodePropertiesOption);
const auto& map = Global::getCombinedIdpWhitelist();
QSet<QString> idpList;
for (auto it = map.constBegin(); it != map.constEnd(); ++it) {
- for (QString s : it.value().toStringList()) {
- idpList.insert(s.replace(REGEX, QString()));
+ for (const QString &s : it.value().toString().split(' ')) {
+ idpList.insert(s);
}
}
idpSpaceList = idpList.values().join(' ');