diff options
author | Will Rogers | 2020-09-09 14:00:31 +0000 |
---|---|---|
committer | Lars Vogel | 2020-09-11 07:58:28 +0000 |
commit | 03285ca2c39c48d86b22211483638f53c9a56da6 (patch) | |
tree | 4b492970c0bdb4022f3fa826f0afdd28f19bd46d | |
parent | e29922459cba18f9f7ff821f12b3cee57f01ae15 (diff) | |
download | eclipse.platform.swt-03285ca2c39c48d86b22211483638f53c9a56da6.tar.gz eclipse.platform.swt-03285ca2c39c48d86b22211483638f53c9a56da6.tar.xz eclipse.platform.swt-03285ca2c39c48d86b22211483638f53c9a56da6.zip |
Bug 566133 - ensure valid characters in GDBus names.
Change-Id: Ib002f43e00ab0a90ced324b0cd40f2948ff1c1e5
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/GDBus.java | 4 |
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; } |