Opened 6 years ago

#15585 new defect

D-Bus signals names are not properly checked

Reported by: sardemff7 Owned by:
Milestone: Component: libpurple
Version: 2.10.7 Keywords: dbus D-Bus signal signals
Cc:

Description

In purple_dbus_convert_signal_name, the signal name is not checked for '.', which is a reserved char for D-Bus.

Moreover, libpurple signal names can be any UTF-8 arbitrary string, while D-Bus signal names are limited to [A-Z][a-z][0-9]_ ASCII characters. The purple_dbus_convert_signal_name function also assumes ASCII (but the whole set here) while the libpurple documentation does not mention this.

The main question is where to fix that: — in the documentation, limiting signal names to the same subset as D-Bus — in purple_dbus_convert_signal_name, to support the whole UTF-8 set — at both places, to limit signal names to ASCII and convert it to the D-Bus subset

We can also add a flag as mentioned in the comment here And maybe automatically add this flag at signal creation time if an unsupported character is found.

Attachments (3)

0001-libpurple-Limit-signal-names-to-ASCII.patch (1.8 KB) - added by sardemff7 6 years ago.
Document and checks for signal names to be ASCII only
0002-libpurple-Add-purple_signal_register_with_flags.patch (6.2 KB) - added by sardemff7 6 years ago.
Add the ability to register a signal with flags (NO_DBUS flag only for now)
0003-libpurple-Compute-D-Bus-signal-name-when-registering.patch (4.7 KB) - added by sardemff7 6 years ago.
Compute the D-Bus signal name at register time and not on each emit

Download all attachments as: .zip

Change History (3)

Changed 6 years ago by sardemff7

Document and checks for signal names to be ASCII only

Changed 6 years ago by sardemff7

Add the ability to register a signal with flags (NO_DBUS flag only for now)

Changed 6 years ago by sardemff7

Compute the D-Bus signal name at register time and not on each emit

Note: See TracTickets for help on using tickets.
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!