After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 711406 - Don’t expose blocked BlueZ devices as persona stores
Don’t expose blocked BlueZ devices as persona stores
Status: RESOLVED FIXED
Product: folks
Classification: Platform
Component: BlueZ backend
git master
Other All
: Normal normal
: Unset
Assigned To: folks-maint
folks-maint
Depends on:
Blocks:
 
 
Reported: 2013-11-04 14:09 UTC by Philip Withnall
Modified: 2013-11-06 14:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
bluez: Prevent blocked Bluetooth devices from becoming persona stores (2.76 KB, patch)
2013-11-04 14:10 UTC, Philip Withnall
committed Details | Review

Description Philip Withnall 2013-11-04 14:09:13 UTC
If a BlueZ device’s Blocked property is true, all incoming connections from it will be rejected by BlueZ. Accordingly, folks shouldn’t try and use it as a persona store.

Patch coming.
Comment 1 Philip Withnall 2013-11-04 14:10:16 UTC
Created attachment 258928 [details] [review]
bluez: Prevent blocked Bluetooth devices from becoming persona stores

If the user has explicitly blocked a Bluetooth phone from their laptop, they
don’t want to try downloading contacts from it.
Comment 2 Xavier Claessens 2013-11-04 14:38:01 UTC
I don't know much about the bluez backend, but it seems to makes sense.
Comment 3 Simon McVittie 2013-11-06 11:05:07 UTC
Review of attachment 258928 [details] [review]:

::: backends/bluez/bluez-backend.vala
@@ +241,3 @@
           /* Sometimes the UUIDs property only changes a second or two after
            * the device first appears, so try adding the device again. */
+          if (device.paired == true && device.blocked == false &&

I'd have said "if (device.paired && !device.blocked" but if this is your coding style, fine.
Comment 4 Simon McVittie 2013-11-06 11:05:29 UTC
Review of attachment 258928 [details] [review]:

a-c_n
Comment 5 Philip Withnall 2013-11-06 14:50:18 UTC
Comment on attachment 258928 [details] [review]
bluez: Prevent blocked Bluetooth devices from becoming persona stores

commit c2b005182b114769a768890642d6302bd669f981
Author: Philip Withnall <philip.withnall@collabora.co.uk>
Date:   Mon Nov 4 14:09:34 2013 +0000

    bluez: Prevent blocked Bluetooth devices from becoming persona stores
    
    If the user has explicitly blocked a Bluetooth phone from their laptop, they
    don’t want to try downloading contacts from it.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=711406

 NEWS                              |  1 +
 backends/bluez/bluez-backend.vala | 21 +++++++++++++++++----
 2 files changed, 18 insertions(+), 4 deletions(-)