Mantis Bugtracker

Расширенный вид комментарии ] простой вид ] история ] печать ]
Номер Категория Серьезность Воспроизводимость Создан Изменен
0000054 [obex-data-server] General большая всегда 2008-02-27 20:52 2008-10-17 19:59
Инициатор hadess Видимость общая  
Ответственный skirsdeda
Приоритет высокий Решение решен Платформа
Состояние закрыт   Операционная система
Трудоемкость нет   Версия ОС
Примерный срок нет Решен в версии 0.4 Версия продукта
  Целевая версия 0.4 Сборка продукта
Суть 0000054: Accept/Reject doesn't work for short files
Подробности The attached patch adds Accept/Reject support to the test server.

It fails to work for short files (in this case a todo item from my Nokia phone, 246 bytes) though, it works well with larger files (photos sent from the phone).

Marking as major severity and private, as it's a potential security issue.
Шаги по воспроизведению
Дополнительные сведения Log with the short file:

$ ./ods-server-test.py opp ~/Desktop/Downloads/
Server object: /org/openobex/server2
Started
Session created: /org/openobex/serversession2
Session Bluetooth address: 00:12:D2:79:B7:33
>>/org/openobex/serversession2<< Transfer started (Nokia.vcs, /home/hadess/Desktop/Downloads/Nokia(2).vcs, 246)
ERROR:dbus.connection:Exception in handler for D-Bus signal:
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/dbus/connection.py", line 210, in maybe_handle_message
    self._handler(*args, **kwargs)
  File "./ods-server-test.py", line 49, in transfer_started_cb
    self.session.Accept()
  File "/usr/lib/python2.5/site-packages/dbus/proxies.py", line 135, in __call__
    **keywords)
  File "/usr/lib/python2.5/site-packages/dbus/connection.py", line 603, in call_blocking
    message, timeout)
DBusException: org.openobex.Error.Failed: There is no transfer in progress
>>/org/openobex/serversession2<< Transfer completed
>>/org/openobex/serversession2<< Disconnected
Session removed: /org/openobex/serversession2

Log with the bigger file:

$ ./ods-server-test.py opp ~/Desktop/Downloads/
Server object: /org/openobex/server0
Started
Session created: /org/openobex/serversession0
Session Bluetooth address: 00:12:D2:79:B7:33
>>/org/openobex/serversession0<< Transfer started (Image000.jpg, /home/hadess/Desktop/Downloads/Image000(1).jpg, 673328)
>>/org/openobex/serversession0<< Progress: 0 %
>>/org/openobex/serversession0<< Transfer cancelled
>>/org/openobex/serversession0<< Disconnected
Session removed: /org/openobex/serversession0
Tэги Нет прикрепленных тэгов.
Вложенные файлы ? file icon ods-auto-accept-test.patch [^] (798 bytes) 2008-02-27 20:52
txt file icon ods-accept-bug-log.txt [^] (1,786 bytes) 2008-03-01 15:26
txt file icon ods-accept-bug-log-2.txt [^] (1,783 bytes) 2008-03-02 04:45
txt file icon ods-accept-bug-log-working.txt [^] (65,095 bytes) 2008-03-02 04:49
? file icon openobex_cvs.patch [^] (321 bytes) 2008-05-12 23:00

- Связи
имеет дубль 0000063закрытskirsdeda auto_accept parameter in Server.start not respected in opp mode, always considered true 

-  Комментарии
(0000089)
skirsdeda (администратор)
2008-03-01 01:48

Updated ods-server-test.py included in svn. Can't reproduce this though...
(0000095)
hadess (инициатор)
2008-03-01 02:20

I can reproduce this every time. I've attached a log of ods server with debug enabled. Feel free to give me patches with more debug if you feel necessary.
(0000096)
skirsdeda (администратор)
2008-03-01 15:15

Don't see that ods log
(0000097)
hadess (инициатор)
2008-03-01 15:27

My mistake, got confused by mantis.
(0000098)
skirsdeda (администратор)
2008-03-01 17:13

Ok, this gives me some information. Could you also send ods log when receiving bigger file?
(0000099)
skirsdeda (администратор)
2008-03-01 22:07

from ods-accept-bug-log.txt:
** Message: obex-data-server 0.01

I don't get this :) Should be 0.3, but judging from other info, this is at least 0.2
(0000103)
hadess (инициатор)
2008-03-02 04:46

Must have been some left-over files from a previous build. Still happening with the current SVN after a rebuild.
(0000104)
skirsdeda (администратор)
2008-03-02 16:49

Ok, I figured this out. The problem is that if entire file is sent in first request (along with filename, length, etc), request cannot be suspended (to wait for Accept()/Reject()). A workaround should be implemented in ods. Transfer shouldn't be finished until Accept()/Reject() is called, in this case Accept() would just finish transfer and Reject() would delete received file.
(0000194)
skirsdeda (администратор)
2008-03-26 13:00

Making this public to avoid more dups.
(0000195)
skirsdeda (администратор)
2008-03-26 13:04

Accept()/Reject() currently doesn't work AT ALL. It's because request is suspended in wrong place.
(0000210)
heston_james (инициатор)
2008-04-05 18:32

When we're talking about 'small files' so we actualy know what the size limit is? From my experience this is quite normal behaviour, I know the OBEX servers on some brands of mobile phone seem to work in this fasion and place in a work around which stops the file from being saved untill it is 'accepted'.

Once we've moved the Accept/Reject into the correct location I cant see that it would be too much work to build in a workaround, provided we can identify the size of file which is currently slipping through the net.

Do we know it? or would you like me to carry out some testing to resolve this?

Heston.
(0000238)
skirsdeda (администратор)
2008-05-12 21:48
изменен: 2008-05-12 21:51

Made some good progress with this bug. It turns out that Accept/Reject won't work with openobex 1.3, we need cvs version (with one wrong line of code removed). This is because we need to suspend the request _before_ first packet is sent and this is not supported in openobex 1.3.

Did some initial testing and Accept/Reject seems to work the way it is supposed to. There are still several uncertainties left which I have to check.

(0000239)
skirsdeda (администратор)
2008-05-12 23:02

Fix commited to svn. Use openobex cvs version with attached patch (openobex_cvs.patch) to test.

Set auto_accept = False in ods-server-test.py to test Accept/Reject.

- история
Дата изменения Пользователь Поле Изменение
2008-02-27 20:52 hadess Новый вопрос
2008-02-27 20:52 hadess Файл добавлен: ods-auto-accept-test.patch
2008-02-27 21:00 hadess Отслеживать: hadess
2008-02-28 01:26 skirsdeda Состояние новый => назначен
2008-02-28 01:26 skirsdeda Ответственный => skirsdeda
2008-03-01 01:26 skirsdeda Приоритет обычный => высокий
2008-03-01 01:48 skirsdeda Комментарий добавлен: 0000089
2008-03-01 01:48 skirsdeda Состояние назначен => нужен отклик
2008-03-01 02:20 hadess Комментарий добавлен: 0000095
2008-03-01 15:15 skirsdeda Комментарий добавлен: 0000096
2008-03-01 15:26 hadess Файл добавлен: ods-accept-bug-log.txt
2008-03-01 15:27 hadess Комментарий добавлен: 0000097
2008-03-01 17:13 skirsdeda Комментарий добавлен: 0000098
2008-03-01 22:07 skirsdeda Комментарий добавлен: 0000099
2008-03-02 04:45 hadess Файл добавлен: ods-accept-bug-log-2.txt
2008-03-02 04:46 hadess Комментарий добавлен: 0000103
2008-03-02 04:49 hadess Файл добавлен: ods-accept-bug-log-working.txt
2008-03-02 16:49 skirsdeda Комментарий добавлен: 0000104
2008-03-02 16:49 skirsdeda Состояние нужен отклик => назначен
2008-03-02 17:03 skirsdeda Связь добавлена блокирует 0000058
2008-03-26 12:58 skirsdeda Видимость ограниченная => общая
2008-03-26 12:59 skirsdeda Связь добавлена имеет дубль 0000063
2008-03-26 13:00 skirsdeda Комментарий добавлен: 0000194
2008-03-26 13:04 skirsdeda Комментарий добавлен: 0000195
2008-04-05 18:32 heston_james Комментарий добавлен: 0000210
2008-05-12 21:48 skirsdeda Комментарий добавлен: 0000238
2008-05-12 21:51 skirsdeda Комментарий изменен: 0000238
2008-05-12 23:00 skirsdeda Файл добавлен: openobex_cvs.patch
2008-05-12 23:02 skirsdeda Комментарий добавлен: 0000239
2008-05-12 23:11 skirsdeda Состояние назначен => отработан
2008-05-12 23:11 skirsdeda Решение открыт => решен
2008-05-28 17:23 skirsdeda Связь удалена блокирует 0000058
2008-07-24 15:00 skirsdeda Целевая версия => 0.4
2008-10-17 19:59 skirsdeda Решен в версии => 0.4
2008-10-17 19:59 skirsdeda Состояние отработан => закрыт


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker