Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/GDBus.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/GDBus.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/GDBus.java
index bd1e9d776d..8bda62b217 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/GDBus.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/GDBus.java
@@ -153,6 +153,10 @@ public class GDBus {
}
if (appName != null) {
+ // GDBus allows alphanumeric characters, underscores and hyphens.
+ // https://gitlab.gnome.org/GNOME/glib/blob/master/gio/gdbusutils.c
+ // Replace invalid GDBus characters with hyphens.
+ appName = appName.replaceAll("[^0-9A-Za-z_.\\-]", "-");
serviceName += "." + appName;
}

Back to the top