Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWill Rogers2020-09-09 14:00:31 +0000
committerLars Vogel2020-09-11 07:58:28 +0000
commit03285ca2c39c48d86b22211483638f53c9a56da6 (patch)
tree4b492970c0bdb4022f3fa826f0afdd28f19bd46d
parente29922459cba18f9f7ff821f12b3cee57f01ae15 (diff)
downloadeclipse.platform.swt-03285ca2c39c48d86b22211483638f53c9a56da6.tar.gz
eclipse.platform.swt-03285ca2c39c48d86b22211483638f53c9a56da6.tar.xz
eclipse.platform.swt-03285ca2c39c48d86b22211483638f53c9a56da6.zip
Bug 566133 - ensure valid characters in GDBus names.
-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