Refuse non-string parameters to Polkit.spawn()
authorMiloslav Trmač <mitr@redhat.com>
Thu, 18 Apr 2013 18:32:05 +0000 (20:32 +0200)
committerMiloslav Trmač <mitr@redhat.com>
Mon, 6 May 2013 18:05:27 +0000 (20:05 +0200)
commit18f9d2608b145a3cc39e88b3e8aa74c742d47190
tree5597f1ff8627c732d1eabbc0ff913461d8dff7c9
parent8085a29c67c4a6e1f58f8975e0f7426d09d0fa99
Refuse non-string parameters to Polkit.spawn()

Using integers or floating-point numbers could have resulted in a crash.

Use JSVAL_IS_STRING() instead of implicit conversion through
JS_ValueToString(); hopefully this will nudge the rule writer toward
thinking more about the string conversion and the format of the
resulting string.

https://bugs.freedesktop.org/show_bug.cgi?id=63575
src/polkitbackend/polkitbackendjsauthority.c