diff options
author | Andreas Kling <kling@serenityos.org> | 2020-05-16 14:11:35 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-05-16 14:13:09 +0200 |
commit | cd298446328af0d71a74d31f750fb1326689a3fe (patch) | |
tree | acdf2f3444e7cb22325ed60ed13cea5476300e2a /Services/Clipboard | |
parent | f7a75598bb738ae9f9c8293efe161a5724fbb127 (diff) | |
download | serenity-cd298446328af0d71a74d31f750fb1326689a3fe.zip |
LibIPC: Allow opt-in UTF-8 validation on message parameters
You can now mark String message parameters with the [UTF8] attribute.
This will cause the generated decoder to perform UTF-8 validation and
reject the message if the given parameter is not a valid UTF-8 string.
This frees up the receiving side from having to do this validation at
a higher level.
Diffstat (limited to 'Services/Clipboard')
-rw-r--r-- | Services/Clipboard/ClipboardClient.ipc | 2 | ||||
-rw-r--r-- | Services/Clipboard/ClipboardServer.ipc | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Services/Clipboard/ClipboardClient.ipc b/Services/Clipboard/ClipboardClient.ipc index 4434c56f21..50d695e92a 100644 --- a/Services/Clipboard/ClipboardClient.ipc +++ b/Services/Clipboard/ClipboardClient.ipc @@ -1,4 +1,4 @@ endpoint ClipboardClient = 804 { - ClipboardDataChanged(String mime_type) =| + ClipboardDataChanged([UTF8] String mime_type) =| } diff --git a/Services/Clipboard/ClipboardServer.ipc b/Services/Clipboard/ClipboardServer.ipc index 4b419459ec..dc3dd4db28 100644 --- a/Services/Clipboard/ClipboardServer.ipc +++ b/Services/Clipboard/ClipboardServer.ipc @@ -2,6 +2,6 @@ endpoint ClipboardServer = 802 { Greet() => (i32 client_id) - GetClipboardData() => (i32 shbuf_id, i32 data_size, String mime_type) - SetClipboardData(i32 shbuf_id, i32 data_size, String mime_type) => () + GetClipboardData() => (i32 shbuf_id, i32 data_size, [UTF8] String mime_type) + SetClipboardData(i32 shbuf_id, i32 data_size, [UTF8] String mime_type) => () } |