Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dbus: non-UTF8 key names #955

Closed
markus2330 opened this issue Sep 16, 2016 · 9 comments
Closed

dbus: non-UTF8 key names #955

markus2330 opened this issue Sep 16, 2016 · 9 comments
Assignees
Labels

Comments

@markus2330
Copy link
Contributor

This is normally a bug in some application using the D-Bus library.
Couldn't add message argumentprocess 6139: arguments to dbus_message_iter_append_basic() were incorrect, assertion "_dbus_check_is_valid_utf8 (*string_p)" failed in file ../../dbus/dbus-message.c line 2676.
@markus2330 markus2330 added this to the 0.8.18 milestone Sep 16, 2016
@markus2330
Copy link
Contributor Author

Happened during Doing naming tests of check_kdb_internal_suite with dbus mounted as global plugin.

@markus2330
Copy link
Contributor Author

@waht Seems like dbus does not accept arbitrary strings as file names. redis et al. likely have similar issues. Can you take a look?

@waht
Copy link
Contributor

waht commented Jun 5, 2017

Yes this happens if the key name passed to dbus_message_append_args in sendmessage.c contains non-UTF-8 characters. The D-Bus specification requires strings to validate strictly as UTF-8. Redis does not require this - strings are interpreted as binary sequence so encoding is not an issue. This seems also true for ZeroMQ.

As far as I can see Elektra does not care about encoding of key names too. So to fix this issue in the D-Bus plugin keyNames could be converted to UTF-8 if they contain non-UTF-8 characters but what should be used as source encoding? ASCII?

@markus2330
Copy link
Contributor Author

Thank you! Documenting this fact should be enough for now. In the longer term we should extend the iconv plugin to also fix key names.

markus2330 pushed a commit that referenced this issue Jan 26, 2019
@markus2330 markus2330 assigned atmaxinger and unassigned waht Oct 28, 2022
@markus2330 markus2330 changed the title dbus library used incorrectly? dbus: non-UTF8 key names Oct 28, 2022
@markus2330
Copy link
Contributor Author

We should find a proper solution to this. E.g. KDE kopete can have keys with UTF-8 as it allows user-specified status or kmix uses user-specified audio names as section names.

@mpranj did you already try to use our dbus notifications with KDE or GNOME?

@markus2330 markus2330 reopened this Oct 28, 2022
@mpranj
Copy link
Member

mpranj commented Oct 28, 2022

did you already try to use our dbus notifications with KDE or GNOME?

Yes, I used it with GSettings and it was working fine, but I never specifically tested with non-UTF-8 characters.

@markus2330
Copy link
Contributor Author

Did you check if the APIs even allow non-UTF-8 to end up in the KeySet? Nevertheless, we also need some protection to not trigger asserts in the libs that we use.

Copy link

I mark this stale as it did not have any activity for one year. I'll close it in two weeks if no further activity occurs. If you want it to be alive again, ping by writing a message here or create a new issue with the remainder of this issue.
Thank you for your contributions 💖

@github-actions github-actions bot added the stale label Feb 26, 2024
Copy link

I closed this now because it has been inactive for more than one year. If I closed it by mistake, please do not hesitate to reopen it or create a new issue with the remainder of this issue.
Thank you for your contributions 💖

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants