summaryrefslogtreecommitdiffstats
path: root/src/webview.cpp
diff options
context:
space:
mode:
authorSimon Rettberg2024-06-25 11:40:36 +0200
committerSimon Rettberg2024-06-25 11:40:36 +0200
commit2ea077382d0500a6554018539a985e0eaf32a92a (patch)
tree9f76201947dafed4ed4ca15a2f73960e9c593774 /src/webview.cpp
parentAdd allowed-shibboleth-domains config option to inject in website (diff)
downloadslxgreeter-2ea077382d0500a6554018539a985e0eaf32a92a.tar.gz
slxgreeter-2ea077382d0500a6554018539a985e0eaf32a92a.tar.xz
slxgreeter-2ea077382d0500a6554018539a985e0eaf32a92a.zip
Make shibboleth whitelist a folder which can contain multiple files
This way we can allow the user the create and specify multiple config modules for shibboleth at once.
Diffstat (limited to 'src/webview.cpp')
-rw-r--r--src/webview.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/webview.cpp b/src/webview.cpp
index 4fb8511..7646324 100644
--- a/src/webview.cpp
+++ b/src/webview.cpp
@@ -41,7 +41,7 @@ WebView::WebView(QWidget* parent)
_firstLoad(false)
{
auto p = new UaWebPage;
- if (!Settings::allowedShibbolethDomains().trimmed().isEmpty()) {
+ if (!Global::getCombinedIdpWhitelist().trimmed().isEmpty()) {
QObject::connect(p, &UaWebPage::frameCreated, [this](QWebFrame *frame) {
QObject::connect(frame, &QWebFrame::javaScriptWindowObjectCleared, [this, frame]() {
this->jsInjector(frame);
@@ -72,8 +72,8 @@ WebView::WebView(QWidget* parent)
void WebView::jsInjector(QWebFrame *frame)
{
- QString str = Settings::allowedShibbolethDomains().replace(
- QRegularExpression("[^\\w. -]", QRegularExpression::UseUnicodePropertiesOption),
+ QString str = Global::getCombinedIdpWhitelist().replace(
+ QRegularExpression("[^\\w. /:-]", QRegularExpression::UseUnicodePropertiesOption),
QStringLiteral(""));
frame->evaluateJavaScript(QStringLiteral("var slxIdpFilter ='") + str + QStringLiteral("'"));
}